summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge topic 'correct_multiple_source_warnings'Brad King2022-02-181-0/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 7083b19498 cmake: When given multiple source paths use last instead of first Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7001
| * | cmake: When given multiple source paths use last instead of firstRobert Maynard2022-02-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'cmake-empty-cmd-line-arg'Brad King2022-02-171-0/+8
|\ \ \ | |/ / | | / | |/ |/| | | | | | | f73457ca2e cmake: Ignore any empty "" command line arguments 67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6980
| * cmake: Ignore any empty "" command line argumentsRobert Maynard2022-02-161-0/+8
| | | | | | | | | | | | | | Don't treat empty quote arguments("") as the current working directory but instead ignore them. Fixes #23217
* | cmcmd: add end of options delimiter to cmake -E commandsPeter Würth2022-02-031-1/+17
|/ | | | | | | | | | | | | | | Implements a -- delimiter, that indicates the end of options (starting with a dash -) of a command and separates them from the subsequent operands (positional arguments). The following commands are affected: - env: Implemented the -- delimiter. - cat: The -- delimiter was already kind of considered, but its occurence did not stop the options parsing. - rm: Here the command already implemented the -- delimiter as specified, but it was not documented. Fixes #22970
* cmake: Warn about unnecessary paths on command lineRobert Maynard2022-01-201-0/+6
| | | | | | We can't make it an error as that would break existing behavior. Fixes: #23110
* Tests: Fix RunCMake.CommandLine toolchain case command lineBrad King2022-01-201-1/+1
|
* Add tests that showcase cmake -S limitationsRobert Maynard2022-01-181-0/+13
|
* Tests/RunCMake/CommandLine: Deal with locales that are different from Englishmakise-homura2021-10-151-0/+6
| | | | | | | | | | 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.
* cmake: -E cat stops when an empty file is encounteredJohnny Jazeix2021-09-181-1/+2
| | | | Fixes: #22652
* Deprecate Visual Studio 10 2010 generatorBrad King2021-07-291-0/+7
| | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variableBrad King2021-06-301-0/+9
| | | | | | | | 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
* cmake: Allow CMAKE_BUILD_TYPE to be set by environment variableBrad King2021-06-301-0/+11
| | | | | | | 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
* VS: Add Visual Studio 17 2022 generatorBrad King2021-06-251-1/+1
| | | | Fixes: #22339
* cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variableBrad King2021-06-031-0/+27
| | | | | When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating a new build tree, check for an environment variable of the same name.
* Merge topic 'cmake_build_and_install_command_error_when_given_bad_arguments'Brad King2021-05-141-0/+12
|\ | | | | | | | | | | | | | | | | 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
| * cmake: `--build` and `--install` error out when encountering bad flagsRobert Maynard2021-05-131-0/+12
| | | | | | | | Fixes #22186
* | cmSystemTools: Improve CreateLink and CreateSymlink error codesBrad King2021-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | MSYS: Add support for running under MSYS runtime environmentOrgad Shaneh2021-04-261-2/+2
| | | | | | | | Detect MSYS as CYGWIN, with the required adaptations.
* | cmake: add support for --toolchain command argumentRobert Maynard2021-04-151-1/+23
| |
* | Merge topic 'correct_arg_parsing'Brad King2021-03-291-0/+4
|\ \ | |/ | | | | | | | | | | 79d7bcaf40 cmCommandLineArgument: correctly compute next parse index Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5936
| * cmCommandLineArgument: correctly compute next parse indexRobert Maynard2021-03-261-0/+4
| | | | | | | | | | | | | | Fixes #21966 Correctly compute the next parse index for `ZeroOrOne` when it is zero, and for OneOrMore.
* | cmake: add support for --install-prefix command argumentRobert Maynard2021-03-041-0/+3
|/ | | | Fixes: #21781
* cmake: Error out on unknown arguments starting with `-`.Robert Maynard2020-12-011-0/+2
| | | | Fixes: #21521
* cmake: Fix processing of -Wno-error= flagsBrad King2020-11-171-0/+4
| | | | | Fix two bugs that happened to cancel each other out for cases covered by our test suite. Add a test case that distinguishes them.
* Merge topic 'llvm-rc-CMAKE_RC_FLAGS'Brad King2020-10-291-1/+1
|\ | | | | | | | | | | | | ea03f50842 llvm_rc: add llvm_rc option filter to correctly pick up all options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5412
| * llvm_rc: add llvm_rc option filter to correctly pick up all optionsThomas Bernard2020-10-281-1/+1
| | | | | | | | Fixes: #21315
* | XCode: Use -j build option when job capacity is specified by userFred Baksik2020-10-261-2/+2
|/ | | | Fixes: #18304
* Merge topic 'remove-server-mode'Brad King2020-10-151-2/+1
|\ | | | | | | | | | | | | | | 9952ee063a server: remove deprecated 'cmake -E server' mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !5370
| * server: remove deprecated 'cmake -E server' modeBrad King2020-10-141-2/+1
| | | | | | | | | | | | The server mode has been deprecated since commit 996e1885c4 (server: deprecate in favor of the file-api, 2019-04-19, v3.15.0-rc1~198^2). Clients should now be using the file-api. Remove the server mode.
* | Merge topic 'cmake-E-cat-binary'Brad King2020-10-151-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows 90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5364
| * cmake: Fix '-E cat' command for binary files on WindowsJohnny Jazeix2020-10-141-0/+3
| | | | | | | | | | | | | | Reset `std::cout` to write in binary mode with no encoding conversions. Co-Author: Brad King <brad.king@kitware.com> Fixes: #21295
* | cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflictThomas Bernard2020-08-071-4/+4
| |
* | cmake: Add -E create_hardlinkSibi Siddharthan2020-07-151-0/+36
| | | | | | | | | | Fixes: #20950 Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
* | cmake-install: implement default directory permissionsAsit Dhal2020-06-251-0/+26
| | | | | | | | | | | | provide an argument for default directory permissions in cmake --install Fixes: #20700
* | cmake: add dedicated error for -E compare_files invalid argumentsAsit Dhal2020-06-151-0/+1
| | | | | | | | | | | | Return 2 when user provides invalid arguments Fixes: #20815
* | Tests: Add case for cmake --build with a failing targetBrad King2020-06-121-0/+2
|/
* cmake: Allow arbitrary args passed to CMake scriptAlex Turbov2020-05-061-0/+1
|
* cmake -E: add cat command.Johnny Jazeix2020-04-151-0/+38
| | | | | | Concatenate files and print on the standard output. FIXES: #20557
* Merge topic 'llvm-rc-include-path'Brad King2020-04-071-8/+8
|\ | | | | | | | | | | | | 35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4570
| * llvm-rc: Restore include path for data after explicit preprocessingThomas Bernard2020-04-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly preprocess RC source files and then compile separately without -I flags. This broke cases where the RC source references data files adjacent to itself or in the include path. This change adds the expansion of the include paths when calling the llvm-rc in order for the resource files to be picked up correctly by llvm-rc. Since the RC compiled file is first preprocessed, the file being compiled by llvm-rc resides in the build directory. In order for llvm-rc to find the resource data specified relative to the .rc file being compiled, the source file path is preppended in the include list so that the original source path takes priority over all the other includes paths specified. A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include directive work properly for llvm-rc. Checks on the rc.exe showed that the syntax change doesn't affect it's proper operation. Fixes: #20529
* | Merge topic 'llvm-rc-stderr'Brad King2020-03-271-3/+2
|\ \ | |/ | | | | | | | | | | dc93cbb0d8 llvm-rc: Print stderr output when calling tools through cmake_llvm_rc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4525
| * llvm-rc: Print stderr output when calling tools through cmake_llvm_rcThomas Bernard2020-03-261-3/+2
| | | | | | | | | | | | The stored error pipe is output if the program fails. Fixes: #20494
* | cmake: add command line options to output script profiling dataWouter Klouwen2020-03-071-0/+22
|/ | | | | | | | | | | | | | | For users of CMake who want to optimize their scripts if they take a while to run, this commit adds the ability to output profiling data. To enable this output, it adds the two command line parameters to select the output path and format. This commit adds the first profiling format of type ``google-trace``, which is the output is a JSON file containing Duration events as per the Google Trace Format specification: https://docs.google.com/document/d/1CvAClvFfyA5R- PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
* Add -E cmake_llvm_rc to preprocess files for llvm-rcThomas Bernard2020-02-041-0/+30
| | | | | | | | | llvm-rc requires preprocessed rc files. The CMake command line tool cmake_llvm_rc enables channing the preprocessor call and the resource compiler and make this appear as single compilation step. When llvm-rc is detected as resource compiler, the RC compilation step is set to use this command.
* trace: Add test for the JSON-v1 traceDaniel Mensinger2019-12-231-0/+8
|
* cmake -E: Add rm with improved semantics over remove and remove_directoryJohnny Jazeix2019-11-131-0/+70
|
* Initialize CMAKE_EXPORT_COMPILE_COMMANDS from envvar of the same nameDaan De Meyer2019-10-181-0/+18
| | | | Fixes: #18386
* cmake: Fix relative path regression in -CPeter Waller2019-10-141-3/+12
| | | | | | | | | | | | | | | | | | Since commit 4ca0526f8a (cmake: Pass -S and -B into PreLoad.cmake and -C scripts, 2019-08-20, v3.16.0-rc1~195^2) the value of `CMAKE_SOURCE_DIR` is the source directory rather than the current working directory. This was correct on its own, but the place storing that value is also used as the base for relative paths specified on the command line. The latter should of course be relative to the current working directory. The fix is to switch to use a full path internally, unless a full path is already specified. Add tests for the behaviour of `-C` under these four circumstances: {with -S, without -S} x {full path, relative path} Fixes: #19827
* Merge topic 'remove_directory-symlink'Brad King2019-08-301-0/+11
|\ | | | | | | | | | | | | e6c9a8bac3 cmake: Teach -E remove_directory to remove directory symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3738