Brad King
d2e9478321
Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory
...
Verify that the work directory is not selected as the source or build
tree.
Issue: #23285
2022-03-02 12:21:34 -05:00
Robert Maynard
78e8f11456
cmake: Correct regression in -B <dir> <src_dir>
...
Fixes : #23285
2022-03-02 12:21:16 -05:00
Brad King
4091d5c58c
Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs
2022-03-02 12:21:03 -05:00
Brad King
1b97f8f35c
Tests: Clarify RunCMake.CommandLine ExplicitDirs case names
2022-03-02 10:53:41 -05:00
Robert Maynard
7083b19498
cmake: When given multiple source paths use last instead of first
...
When given two source paths via `-S` or just directory paths prefer
the last one. When the paths are mixed always prefer the last `-S`
entry.
Fixes : #23238
2022-02-17 16:54:30 -05:00
Robert Maynard
f73457ca2e
cmake: Ignore any empty "" command line arguments
...
Don't treat empty quote arguments("") as the current working
directory but instead ignore them.
Fixes #23217
2022-02-16 12:11:33 -05:00
Brad King
63154cbf45
Merge topic 'vs-package-restore'
...
9aa7831f05 Presets: add resolve packages setting to build presets.
b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages.
193b8fca52 cmBuildOptions: Split build arguments into separate object.
6a10103493 Help: Update preset schema description for version 3 entries.
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !6761
2022-01-24 11:46:29 -05:00
Carsten Rudolph
b2f8f0bb87
cmGlobalVisualStudio10Generator: Auto restore NuGet packages.
2022-01-22 06:35:41 -05:00
Robert Maynard
eacf1f879b
cmake: Warn about unnecessary paths on command line
...
We can't make it an error as that would break existing behavior.
Fixes : #23110
2022-01-20 14:38:12 -05:00
Brad King
a4f076110d
Tests: Fix RunCMake.CommandLine toolchain case command line
2022-01-20 14:36:48 -05:00
Robert Maynard
2e1b7e5b9a
Add tests that showcase cmake -S limitations
2022-01-18 11:53:21 -05:00
Kyle Edwards
3c3698b0e4
FileAPI: Add information on file set installers
2021-10-27 15:17:23 -04:00
makise-homura
ea55ac9a51
Tests/RunCMake/CommandLine: Deal with locales that are different from English
...
RunCMake/CommandLine has problems
when ran using language setting differeng from English. This is due to
test outputs being compared to English strings, which comparison
obviously fails if this language is set to, e.g. Russian. This commit
sets locale as "C" prior to running these tests, so messages while
testing are generated in correct language and do not fail checks
anymore.
2021-10-15 05:04:24 +03:00
Johnny Jazeix
0b4a56e64b
cmake: -E cat stops when an empty file is encountered
...
Fixes : #22652
2021-09-18 18:54:53 +02:00
Brad King
22dab6eb96
Deprecate Visual Studio 10 2010 generator
...
Update documentation to mark the generator deprecated. Add a warning at
the end of generation plus an option to turn off the warning.
2021-07-29 14:15:01 -04:00
Brad King
bf8bf11fe5
Merge topic 'doc-cmake-build-signature'
...
161f1f42d6 Help: Clarify 'cmake --build' signature alternatives
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !6343
2021-07-14 09:22:27 -04:00
Brad King
161f1f42d6
Help: Clarify 'cmake --build' signature alternatives
...
Documentation added by
* commit 4f4f2028b8 (Help: Add documentation for buildPresets and
testPresets, 2021-01-13, v3.20.0-rc1~51^2~7)
* commit 676ecf0d37 (cmake-presets: Add build and test presets,
2020-12-14, v3.20.0-rc1~51^2~6)
used square brackets in the `cmake --build` signature to indicate
non-optional alternatives, which is not a typical convention.
A common convention is to use parentheses instead, but in this
case it is probably clearer to list the two signatures separately.
Fixes : #22413
2021-07-13 09:41:26 -04:00
Brad King
ef56eefc9b
cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
...
When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while
creating a new build tree, check for an environment variable of the same
name.
Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
e216b9bbd3
cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
...
When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new
build tree, check for an environment variable of the same name.
Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
c46b265839
VS: Add Visual Studio 17 2022 generator
...
Fixes : #22339
2021-06-25 12:45:44 -04:00
Brad King
6c34ed9b87
cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable
...
When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating
a new build tree, check for an environment variable of the same name.
2021-06-03 08:32:44 -04:00
Robert Maynard
396e0a840e
cmCommandLineArgument: OneOrMore mode supports = separator
...
Fixes #22187
2021-05-19 11:37:30 -04:00
Robert Maynard
372bf1bcc4
cmCommandLineArgument: Understands which commands require partial matching
...
Allows us to provide better error messages when commands such as
`--target` are passed invalid input.
2021-05-19 11:07:16 -04:00
Brad King
e2c5209532
Merge topic 'cmake_build_and_install_command_error_when_given_bad_arguments'
...
f78b167a23 cmCommandLineArgument: Provide more information syntax error messages
5aa0dec6b0 cmake: `--build` and `--install` error out when encountering bad flags
928cdb17c5 cmCommandLineArgument: Correctly record parsing failures
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !6119
2021-05-14 08:33:29 -04:00
Robert Maynard
f78b167a23
cmCommandLineArgument: Provide more information syntax error messages
2021-05-13 09:33:30 -04:00
Robert Maynard
5aa0dec6b0
cmake: --build and --install error out when encountering bad flags
...
Fixes #22186
2021-05-13 09:28:42 -04:00
Brad King
d7522b8f86
cmSystemTools: Improve CreateLink and CreateSymlink error codes
...
In commit 7f89053953 (cmSystemTools: Return KWSys Status from CreateLink
and CreateSymlink, 2021-04-15) we just took the `-err` from libuv and
treated it as a POSIX error. This is accurate on POSIX, but on Windows
does not match the POSIX error codes.
Use `uv_fs_get_system_error` to get the actual system error code.
This requires libuv 1.38 or higher. Require that for Windows, but
fall back to the previous approach on POSIX.
2021-05-07 08:30:52 -04:00
Orgad Shaneh
ddcd1469e8
MSYS: Add support for running under MSYS runtime environment
...
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
5ac713da70
Merge topic 'mrjoel/add-missing-not'
...
370bebd921 Add missing 'not' in error messages
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !6012
2021-04-19 09:44:03 -04:00
Joel Johnson
370bebd921
Add missing 'not' in error messages
2021-04-16 07:47:59 -06:00
Robert Maynard
d5c3e4ac32
cmake: add support for --toolchain command argument
2021-04-15 10:13:49 -04:00
Brad King
c4f8005454
Merge topic 'correct_arg_parsing'
...
79d7bcaf40 cmCommandLineArgument: correctly compute next parse index
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5936
2021-03-29 09:29:40 -04:00
Robert Maynard
79d7bcaf40
cmCommandLineArgument: correctly compute next parse index
...
Fixes #21966
Correctly compute the next parse index for `ZeroOrOne` when
it is zero, and for OneOrMore.
2021-03-26 09:34:46 -04:00
Brad King
a12d7f70b1
fileapi: Add a "directory" object to codemodel-v2
...
This object will contain more detailed directory-level information.
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com >
2021-03-16 16:47:43 -04:00
Robert Maynard
b227a9565e
cmake: configure preset add support for --install-prefix mapping
2021-03-09 13:53:16 -05:00
Robert Maynard
38140713ad
cmake: add support for --install-prefix command argument
...
Fixes : #21781
2021-03-04 10:50:24 -05:00
Sam Freed
69a5cf23a2
Tests: Update RunCMake/CommandLine BuildDir
2021-02-04 11:39:55 -05:00
Brad King
cc47f4ebf9
Merge topic 'fileapi-toolchains'
...
6418dabb87 Tests: Add test for toolchains-v1 File API object
1c5bd1bed5 Tests: Add toolchains kind to capabilities test
f72bb2ee0d Help: Add documentation for "toolchains" object kind
bb069c0857 cmFileAPI: Add "toolchains" object kind.
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5678
2021-01-14 13:02:54 -05:00
Ben McMorran
1c5bd1bed5
Tests: Add toolchains kind to capabilities test
2021-01-12 14:25:39 -08:00
Brad King
b7485c98a0
Merge topic 'trace_expand_bracket'
...
e6e7f2cab9 cmMakefile: Don't expand bracket arguments in --trace-expand
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5687
2021-01-12 10:20:26 -05:00
Raul Tambre
e6e7f2cab9
cmMakefile: Don't expand bracket arguments in --trace-expand
...
Bracket arguments are literal and shouldn't be expanded.
Fixes #21671 .
2021-01-11 19:54:18 +02:00
Kai Wang
b696f78073
cmDepends: merge dependers of depend makefile
...
Since one depender has multiple dependees, depend makefile generated
same depender line by line, to reduce file size and refine make file
parse speed, merge same dependers to one. And add a testcase for
large depend.make which generated source file includes 20000 header
files and run build and incremental build
Signed-off-by: Wangkai <wangkai86@huawei.com >
Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com >
2021-01-05 07:48:27 -05:00
Robert Maynard
1b6c5333a0
cmake: Error out on unknown arguments starting with -.
...
Fixes : #21521
2020-12-01 09:04:08 -05:00
Robert Maynard
98290782b6
cmake: redesign command-line argument parsing
...
Make handling more consistent:
"-S" -> invalid
"-S/path/to/source" -> valid
"-S /path/to/source" -> valid
"-S=/path/to/source" -> now valid
"-D" -> invalid
"-DStr" -> valid
"-D Str" -> valid
"-D=Str" -> now valid
"--log-level=" -> invalid
"--log-level" -> invalid
"--log-level=2" -> valid
"--log-level 2" -> now valid
2020-11-19 08:53:58 -05:00
Brad King
d800c26ce9
cmake: Fix processing of -Wno-error= flags
...
Fix two bugs that happened to cancel each other out for cases covered
by our test suite. Add a test case that distinguishes them.
2020-11-17 13:22:52 -05:00
Brad King
32d369aa70
Merge topic 'llvm-rc-CMAKE_RC_FLAGS'
...
ea03f50842 llvm_rc: add llvm_rc option filter to correctly pick up all options
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5412
2020-10-29 10:14:20 -04:00
Brad King
9b4016a61a
Merge topic 'xcode_build_jobs'
...
e794509faa XCode: Use -j build option when job capacity is specified by user
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5429
2020-10-28 07:38:07 -04:00
Thomas Bernard
ea03f50842
llvm_rc: add llvm_rc option filter to correctly pick up all options
...
Fixes : #21315
2020-10-28 07:19:31 -04:00
Craig Scott
105ef112c9
Merge topic 'cmake-presets-path-arg'
...
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !5416
2020-10-27 07:33:46 -04:00
Fred Baksik
e794509faa
XCode: Use -j build option when job capacity is specified by user
...
Fixes : #18304
2020-10-26 13:28:54 -04:00