summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Fix relative path regression in -CPeter Waller2019-10-1412-10/+38
| | | | | | | | | | | | | | | | | | 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-305-0/+23
|\ | | | | | | | | | | | | e6c9a8bac3 cmake: Teach -E remove_directory to remove directory symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3738
| * cmake: Teach -E remove_directory to remove directory symlinksJon Chronopoulos2019-08-305-0/+23
| | | | | | | | | | | | | | If the argument to `remove_directory` is a symlink to a directory, remove the symlink instead. Issue: #19533
* | cmake: Pass -S and -B into PreLoad.cmake and -C scriptsPeter Waller2019-08-277-0/+35
|/ | | | | | | Before this, it was not possible to see what the source or build directories were set to on the command line. Fixes: #19619
* Add --trace-redirect parameter to redirect trace output to a fileIgor Ivanov2019-08-107-0/+24
|
* cmake -E: Add true and false commandsKyle Edwards2019-07-113-0/+6
|
* cmake: Teach -E capabilities to report supported fileapi requestsBrad King2019-06-071-1/+1
| | | | Fixes: #19339
* Merge topic 'remove_directories'Brad King2019-06-0411-1/+28
|\ | | | | | | | | | | | | | | | | 07a80c7002 cmake: Teach -E remove_directory to remove multiple directories 013bee698e Tests: Add RunCMake.CommandLine make_directory test checks 3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3411
| * cmake: Teach -E remove_directory to remove multiple directoriesJohn Freeman2019-06-037-0/+18
| | | | | | | | | | The `make_directory` command can make multiple directories in a single invocation. Make `remove_directory` mirror that behavior.
| * Tests: Add RunCMake.CommandLine make_directory test checksJohn Freeman2019-06-032-0/+9
| |
| * Tests: Fix RunCMake.CommandLine make_directory test nameJohn Freeman2019-06-033-1/+1
| |
* | Tests: Fix RunCMake.CommandLine test to use generator in no-S-B caseBrad King2019-06-031-4/+6
|/ | | | | | | Apply the fix from commit baed22c4b0 (Tests: Fix RunCMake.CommandLine test to use generator with -S and -B, 2019-04-10) to the `no-S-B` case too. It also generates a build system and should use the generator being tested.
* Merge topic 'default-generator-env'Brad King2019-05-2223-0/+122
|\ | | | | | | | | | | | | | | | | d0f0ba0f7a Tests: Add environment generator tests a48ce8f4bf Help: Add documentation for default generator environment variables 083cf7e8a2 cmake: Allow default generator to be set by environment variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3218
| * Tests: Add environment generator testsEicke Herbertz2019-05-2223-0/+122
| |
* | Merge topic 'std-pipes-always'Brad King2019-05-031-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | c85524a94a Ensure stdin, stdout, and stderr pipes are always open Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !3282
| * | Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* | cmake: --build -j <jobs> should not accept 0.Fred Baksik2019-05-019-0/+24
|/ | | | Fixes #19059
* Tests: Avoid enabling languages in RunCMake.CommandLine -S and -B casesBrad King2019-04-101-1/+2
| | | | | The test project does not compile any sources and so does not need to enable any languages.
* Tests: Fix RunCMake.CommandLine test to use generator with -S and -BBrad King2019-04-101-11/+15
| | | | | The `-S` and `-B` command-line option tests do generate build systems and so should use the generator being tested.
* Merge topic 'cmake--install'Kyle Edwards2019-03-198-0/+32
|\ | | | | | | | | | | | | | | | | | | | | 73f23d1e00 cmake: add '--install <dir>' option Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Acked-by: Bartosz <gang65@poczta.onet.pl> Acked-by: Cristian Adam <cristian.adam@gmail.com> Rejected-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !3069
| * cmake: add '--install <dir>' optionJiang Yi2019-03-168-0/+32
| | | | | | | | Fixes: #19023
* | cmake: add short version of '--target <tgt>...' optionBartosz Kosiorek2019-03-121-1/+1
|/
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-057-3/+12
| | | | Fixes: #16136
* cmake: Add --ignore-eol option to `-E compare_files` commandTaylor Braun-Jones2019-01-2810-0/+12
| | | | Fixes: #13007
* Merge topic 'cmake_build_jobs_supports_no_space'Brad King2019-01-239-0/+21
|\ | | | | | | | | | | | | | | f2fca92686 cmake: --build supports '-jN' e463133cd2 Tests: Remove unused files from RunCMake.CommandLine test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2819
| * cmake: --build supports '-jN'Robert Maynard2019-01-229-0/+25
| |
| * Tests: Remove unused files from RunCMake.CommandLine testBrad King2019-01-224-4/+0
| | | | | | | | Drop `-stderr.txt` files for cases that do not exist.
* | cmake: Convert no source/build dir error to warningCraig Scott2019-01-223-3/+15
|/ | | | | | | | | | Temporarily restore previous behavior that allowed specifying no source or build directory to work, even though it was neither documented nor supported. This commit is expected to eventually be reverted to restore the fatal error for such cases. Relates: #18817
* Merge topic 'cmake-option-parsing'Brad King2019-01-143-14/+17
|\ | | | | | | | | | | | | | | 27eb7c5bdb cmake: Ensure source and binary dirs are set a1adbc7243 cmake: Stop processing if -P option lacks file name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2799
| * cmake: Ensure source and binary dirs are setCraig Scott2019-01-133-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | If only the source dir is provided, the binary dir is assumed to be the working directory. If only the binary dir is provided and it doesn't yet have a CMakeCache.txt to provide the source dir, then the source dir is assumed to be the working directory. This logic was not previously being handled correctly when -S and/or -B options were involved. Furthermore, when both were missing, no suitable error message was provided and an empty string was used for the build directory. Fixes: #18707
| * Tests: Add cases for -{C,D,U} without a source treeBrad King2019-01-1012-1/+22
| |
* | cmake: Enable --warn-uninitialized inside string(CONFIGURE) and configure_fileArtur Ryt2018-12-293-4/+69
| | | | | | | | Fixes: #18489
* | cmake: add error message when '-E touch' failsIsaiah Norton2018-11-273-0/+4
| | | | | | | | Issue: #16526
* | CMP0053: Fix double warning on uninitialized variables in -P modeR2RT2018-11-053-0/+10
| | | | | | | | | | | | | | | | When `CMP0053` is not set to OLD or NEW then we compute both variants in case we need to warn about a behavior change. Do not allow both code paths to produce an uninitialized variable warning. Fixes: #18552
* | Tests: Add cases for -{C,D,U} without a source treeBrad King2018-10-2612-1/+22
| |
* | Testing: Update hard-coded line numbers to [0-9]+ in some testsKyle Edwards2018-10-106-9/+9
|/
* Merge topic 'symlink'Brad King2018-09-193-31/+42
|\ | | | | | | | | | | | | afb7f6e4ff cmake: Add '-E create_symlink' support on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2144
| * cmake: Add '-E create_symlink' support on WindowsJon Chronopoulos2018-09-183-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | The allows `-E create_symlink` to work on Windows. It utilizes `uv_fs_symlink`. I am still unsure exactly which Windows platforms will work without requiring Administrator privileges or needing a user/group with the "Create Symbolic Links" User Rights. It does work with my Windows 10 Pro with Developer Mode turned on. In the test suite check that the symlink either worked or failed with a permissions error. Use recent changes in cmSystemTools::FileExists to check that a symlink is broken.
* | cmake: -S and -B can be used to specify source and build directoriesRobert Maynard2018-09-1511-0/+42
|/ | | | | | Document the previously internal option of '-B' and provide a matching source directory option with '-S'. Both '-B', and '-S' can be used independently of each other.
* Tests: Adopt wizard test in RunCMake.CommandLineBrad King2018-06-223-0/+3
| | | | Avoid a whole separate test for one removed command-line option.
* clang-format.bash: update to clang-format-6.0Brad King2018-06-011-1/+1
| | | | | | | | | | | | Update `.clang-format` with configuration to make the 6.0 format as close as possible to what 3.8 produced before. Then revise the style: * Indent preprocessor directives (a feature new since 3.8) * Add a newline and indentation before inheritance `:` and `,` Rename the Git attribute identifying the format to include the clang-format version number: `format.clang-format-6.0`. This will aid external infrastructure in knowing what version of the tool to run.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-2517-0/+43
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* Merge topic 'fix-crash-trace-exp-uninit-vars'Brad King2018-04-103-0/+10
|\ | | | | | | | | | | | | aad360eb3d Fix crash with --trace-expand --warn-uninitialized together Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1944
| * Fix crash with --trace-expand --warn-uninitialized togetherR2RT2018-04-093-0/+10
| | | | | | | | | | | | | | | | Some code paths in `ExpandVariablesInString{New,Old}` were not checking the `filename` parameter for a null pointer, but this can happen when using the above flags together. Add the checks and a test case. Fixes: #17896
* | Drop Visual Studio 8 2005 generatorBrad King2018-04-024-12/+0
|/ | | | This generator has been deprecated since CMake 3.9. Remove it.
* cmcmd: Restore support for running multiple lint toolsBrad King2017-10-271-5/+6
| | | | | | | Refactoring in commit v3.10.0-rc1~115^2 (Clean up iwyu code to not be one big if statement, 2017-08-28) incorrectly changed the logic to run only one lint tool at a time. Restore support for running all tools specified on the command-line.
* Clean up iwyu code to not be one big if statement.Bill Hoffman2017-09-1312-7/+11
| | | | | | | | | | This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This is used for co-compile commands. These are tools that want to mirror the compiler. For each compiler invocation the tool will be invoked first. This started as a way to implement include what you use (iwyu), but has expanded to include cpplint, cppcheck and others. Likely there will be more in the future as well. This commit implements each one in its own function and provides a way to add additional ones in the future with less work.
* Add properties to run cppcheck along with the compilerBill Hoffman2017-08-301-1/+1
| | | | | | Create a `<LANG>_CPPCHECK` target property (initialized by a `CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line to be run along with the compiler.
* Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command modeAndré Klitzing2017-07-1431-0/+47
|
* Add some unit tests for md5sumAndré Klitzing2017-07-0910-0/+17
|