summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Add case covering `cmake -E env` with empty environment variableBrad King2025-10-081-0/+1
| | | | Issue: #27285
* Merge topic 'sequential-bom'Brad King2025-09-211-3/+7
|\ | | | | | | | | | | | | | | 54161c70d5 cmListFileLexer: Do not require files to be seekable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !11162
| * cmListFileLexer: Do not require files to be seekableSergiu Deitsch2025-09-191-3/+7
| | | | | | | | | | | | Read the BOM sequentially and store the read bytes for later use if these do not correspond to a BOM. This allows FIFO to be used as input, e.g., for piping input or Bash process substitution.
* | Merge branch 'backport-vs2026' into vs2026Brad King2025-09-151-1/+1
|\ \ | |/ |/|
| * VS: Add Visual Studio 18 2026 generatorBrad King2025-09-151-1/+1
| | | | | | | | Closes: #27213
* | cmake -E: Add copy_if_newer and copy_directory_if_newerBenjamin Buch2025-07-311-0/+14
| | | | | | | | Fixes: #24923
* | Deprecate Visual Studio 14 2015 generatorBrad King2025-06-261-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: Restore acceptance of -DCMAKE_TOOLCHAIN_FILE=//... on non-WindowsBrad King2025-06-231-0/+4
| | | | | | | | | | | | | | POSIX specifies that two leading slashes have implementation-defined interpretation, so CMake 3.31 and below did not normalize away leading double slashes. However, most implementations simply treat a leading `//` as just `/`, so CMake 4.0 now normalizes them away when they do not correspond to a network path on Windows. This change exposed that we were not normalizing `CMAKE_TOOLCHAIN_FILE` before passing its value to `include()` the first time if it was not passed with the `FILEPATH` or `PATH` cache entry type. Fix that. Fixes: #27010
* Tests/RunCMake/CommandLine: Simplify --toolchain casesBrad King2025-06-231-1/+0
|
* Normalize PWD environment variable before using itBrad King2025-04-151-4/+25
| | | | | | | | | In commit 5aed3ee49d (cmSystemTools: Add GetLogicalWorkingDirectory, 2024-10-28, v4.0.0-rc1~528^2~6) we incorrectly trusted `PWD` to be a normalized path so long as its realpath matches the current working directory. Fixes: #26870
* Restore expansion of leading '~' as home directory in input pathsBrad King2025-04-021-0/+1
| | | | | | | | | | | This was accidentally dropped by commit 622596c6b2 (cmSystemTools: Re-implement ToNormalizedPathOnDisk without translation map, 2024-10-30, v4.0.0-rc1~528^2~5). Previously it was done by `CollapseFullPath`. `cm::PathResolver` intentionally does not expand `~` because it makes sense only for transforming input paths. Teach `ToNormalizedPathOnDisk` to handle it directly. Fixes: #26827
* Remove optional arguments from else() and end*() commandsPeter Kokot2025-01-281-1/+1
| | | | | This adds a brief explanation of the optional condition in the `else()` and removes all legacy usages of `else()` and `end*()` commands.
* Tests/RunCMake: Update cmake_minimum_required versions to 3.10Brad King2024-10-031-1/+1
| | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.10 where possible.
* Drop Visual Studio 12 2013 generatorBrad King2024-08-281-7/+0
| | | | This generator has been deprecated since CMake 3.28. Remove it.
* Tests: Simplify tests for Visual Studio generatorsBrad King2024-08-281-13/+10
| | | | | | Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator, 2024-05-06, v3.30.0-rc1~134^2), some tests do not need to be version-dependent.
* Merge topic 'cmake-list-cached-variables'Brad King2024-07-241-0/+10
|\ | | | | | | | | | | | | | | c55239e286 cmake: Add flag to list cache entries matching a regex Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9644
| * cmake: Add flag to list cache entries matching a regexMin Hsu2024-07-231-0/+10
| | | | | | | | | | | | Add a `-LR[A][H] <regex>` flag with similar functionality to `-L[A][H]`, but instead of listing all cached variables, it show only specific variables that match the name regex.
* | cmSystemTools: Add CMake config directoryMartin Duffy2024-07-031-0/+14
|/
* Fix crash in target-specific commands called from initial cache scriptBrad King2024-06-011-0/+2
| | | | Fixes: #26018
* Drop Visual Studio 9 2008 generatorBrad King2024-05-081-13/+0
| | | | This generator has been deprecated since CMake 3.27. Remove it.
* cmake: Allow CMAKE_INSTALL_PREFIX to be set by environment variableSilvio Traversaro2024-01-301-0/+9
| | | | Fixes: #25023
* Merge topic 'cmake-E-cat-stdin'Brad King2023-11-061-0/+2
|\ | | | | | | | | | | | | | | ab72846794 cmake -E cat: Add ability to print standard input Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8942
| * cmake -E cat: Add ability to print standard inputKyle Edwards2023-11-031-0/+2
| |
* | cmSystemTools::RunSingleCommand(): Pass stdin to child processKyle Edwards2023-11-021-0/+1
|/ | | | Fixes: #25383
* Help: Allow help for arbitrary keywordsMartin Duffy2023-09-271-0/+2
| | | | | Changes `cmake --help [arg]` to search `Help/*/` instead of `Help/command/` Allows editors to easily display manual for `<cword>`
* Deprecate Visual Studio 12 2013 generatorBrad King2023-06-261-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.
* Drop Visual Studio 11 2012 generatorBrad King2023-06-131-7/+0
| | | | This generator has been deprecated since CMake 3.25. Remove it.
* cmake: Add debuggerGlen Chung2023-05-301-0/+11
| | | | | | | | | | | | | | | | - Depends on cppdap and jsoncpp. - Add --debugger argument to enable the Debugger. - Add --debugger-pipe argument for DAP traffics over named pipes. - Support breakpoints by filenames and line numbers. - Support exception breakpoints. - Call stack shows filenames and line numbers. - Show Cache Variables. - Show the state of currently defined targets, tests and directories with their properties. - Add cmakeVersion to DAP initialize response. - Include unit tests. Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* Merge topic 'vs9-deprecate'Brad King2023-02-091-0/+7
|\ | | | | | | | | | | | | d7f440c5db Deprecate Visual Studio 9 2008 generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8181
| * Deprecate Visual Studio 9 2008 generatorBrad King2023-02-081-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: Stop parsing after `--` when detecting script modeRobert Maynard2023-02-081-0/+1
|/ | | | | | | | The fix in commit 08aa516880 (cmake: Stop parsing after `--` when detecting script mode, 2022-12-06, v3.26.0-rc1~216^2) only corrected the case where `-P -- -P <arg>` occurred and not `-P -- -P -<other>`. Fixes: #24220
* cmake: Add -E copy_directory_if_differentRobert Maynard2023-01-121-0/+9
| | | | Fixes #21584
* Merge topic 'clang-tidy-export-fixes-dir'Brad King2022-12-071-0/+1
|\ | | | | | | | | | | | | | | 232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7982
| * clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR propertyKyle Edwards2022-12-061-0/+1
| | | | | | | | Fixes: #21362
* | cmake: Stop parsing after `--` when detecting script modeRobert Maynard2022-12-061-0/+1
|/ | | | Fixes #24220
* Merge topic 'cmake-E-copy-t-mode'Brad King2022-11-151-0/+6
|\ | | | | | | | | | | | | 8d9069e5b6 cmake -E copy: Add support for -t argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7913
| * cmake -E copy: Add support for -t argumentKyle Edwards2022-11-151-0/+6
| | | | | | | | Fixes: #23543
* | cmake: --build improve detection of no build dirRobert Maynard2022-11-141-0/+2
|/ | | | Fixes #24157
* cmake: Honor CMAKE_GENERATOR env var in --help outputJuan Ramos2022-10-211-0/+7
|
* try_compile: Propagate --trace through try_compileMatthew Woehlke2022-10-111-0/+2
| | | | | Add ability to specify another cmake instance from which to get the trace output target. Use this during try_compile.
* Deprecate Visual Studio 11 2012 generatorBrad King2022-09-271-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.
* Drop Visual Studio 10 2010 generatorBrad King2022-09-261-7/+0
| | | | This generator has been deprecated since CMake 3.22. Remove it.
* Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-141-0/+2
| | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
* cmake -E env: Add --modify flagAlex Reinking2022-08-171-0/+54
| | | | | | | | | | | | | | | | | | | | | | When `cmake -E env` is given the `--modify` flag, try to parse the following argument as an `ENVIRONMENT_MODIFICATION` operation and apply it to the environment. This generalizes `--unset=`: 1. When implementing `ENVIRONMENT_MODIFICATION` features for other CMake commands, the `MYVAR=OP:VALUE` strings do not need to be translated to OP-specific flags. 2. This provides a natural and consistent extension point to introduce new operations without introducing very many flags. 3. Users need to learn only one syntax to access the same functionality. There is one difference between the behavior here as compared to CTest's interpretation of the `ENVIRONMENT_MODIFICATION` test property. The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR` to whatever its value was when `cmake -E env` launched, rather than try to checkpoint after plain `MYVAR=VALUE` options. This makes `MYVAR=VALUE` and `--modify MYVAR=set:VALUE` semantically equivalent.
* Merge topic 'cmake-help-flags-after-dashdash'Brad King2022-07-251-1/+1
|\ | | | | | | | | | | | | 14a0e750cb cmake: In -P mode ignore flags like `--version` after `--` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7496
| * cmake: In -P mode ignore flags like `--version` after `--`Robert Maynard2022-07-221-1/+1
| | | | | | | | Fixes: #21031
* | Merge topic 'cmake-P-path-args'Brad King2022-07-251-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | febe3190f0 Merge branch 'backport-3.23-cmake-P-path-args' 846a650ff7 cmake: In -P mode ignore extra paths on the command line c362cba566 cmake: simplify to a single source of truth of working mode 261fa5db39 cmake: In -P mode ignore extra paths on the command line 314135cdf1 cmake: simplify to a single source of truth of working mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7494
| * cmake: In -P mode ignore extra paths on the command lineRobert Maynard2022-07-221-0/+1
| | | | | | | | Fixes: #23748
* | Makefiles generator: dependencies messages in verbose modeMarc Chevrier2022-07-061-2/+2
|/ | | | Fixes: #23689