summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add -E copy_directory_if_differentRobert Maynard2023-01-121-0/+9
| | | | Fixes #21584
* FileAPI: Add "configureLog" object kindBrad King2022-12-171-1/+1
| | | | | | | Provide clients with a way to get a known set of configure log event versions. Issue: #23200
* Merge topic 'clang-tidy-export-fixes-dir'Brad King2022-12-073-0/+5
|\ | | | | | | | | | | | | | | 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-063-0/+5
| | | | | | | | Fixes: #21362
* | cmake: Stop parsing after `--` when detecting script modeRobert Maynard2022-12-062-0/+11
|/ | | | Fixes #24220
* Merge topic 'cmake-E-copy-t-mode'Brad King2022-11-153-0/+8
|\ | | | | | | | | | | | | 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-153-0/+8
| | | | | | | | Fixes: #23543
* | Merge topic 'better_handling_of_build_args'Brad King2022-11-153-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 01611f8258 cmake: --build improve detection of no build dir Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7908
| * | cmake: --build improve detection of no build dirRobert Maynard2022-11-143-0/+4
| |/ | | | | | | Fixes #24157
* | project: Warn at top-level if `cmake_minimum_required` wasn't calledfriendlyanon2022-11-111-0/+2
|/ | | | | | | The top-level project() call will now issue an AUTHOR_WARNING if it wasn't called after cmake_minimum_required(). Fixes: #24071
* file-api: support exporting file set informationBen Boeckel2022-11-081-1/+1
| | | | | | | This includes listing the filesets themselves as well as which file set (if any) each source file is associated with. Fixes: #24128
* Tests: Provide RunCMake.CommandLine compare_files data more robustlyBrad King2022-10-312-3/+3
| | | | | | | | The `lf` and `crlf` files need to have exact LF and CRLF newlines, respectively. Previously we used the Git `eol` attribute for this, but occasionally the Git work tree ends up without the conversion. It is unclear why that happens, so try to avoid the problem by treating their content as binary instead.
* cmake: Honor CMAKE_GENERATOR env var in --help outputJuan Ramos2022-10-214-0/+11
|
* try_compile: Propagate --trace through try_compileMatthew Woehlke2022-10-115-0/+23
| | | | | Add ability to specify another cmake instance from which to get the trace output target. Use this during try_compile.
* try_compile: Report build dir with --debug-trycompileMatthew Woehlke2022-10-061-0/+11
| | | | | | | | When `--debug-trycompile` is enabled, issue a log (with trace) for every `try_compile` noting what directory is being used for the compilation. This will make it easier to find the corresponding artifacts. Closes: #24022
* Deprecate Visual Studio 11 2012 generatorBrad King2022-09-274-0/+12
| | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* Tests: Drop unused files from RunCMake.CommandLineBrad King2022-09-272-0/+0
| | | | | Remove files missed by commit 8d6f015d59 (Drop Visual Studio 10 2010 generator, 2022-09-26).
* Drop Visual Studio 10 2010 generatorBrad King2022-09-262-12/+0
| | | | This generator has been deprecated since CMake 3.22. Remove it.
* Merge topic 'modules-use-new-try_compile-signature'Brad King2022-09-143-1/+14
|\ | | | | | | | | | | | | 2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7656
| * Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-143-1/+14
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Tests: Fix RunCMake.CommandLine test in unusual environmentsMatthew Woehlke2022-09-121-1/+6
|/ | | | | | Modify `Tests/RunCMake/CommandLine/P_working-dir.cmake` to not spuriously fail in environments when the build directory's nominal path is not canonicalized (i.e. `realpath(BINDIR) != BINDIR`).
* cmake -E capabilities: Tell whether TLS is enabledKyle Edwards2022-09-011-1/+1
| | | | Fixes: #20507
* cmake -E env: Add --modify flagAlex Reinking2022-08-1714-0/+83
| | | | | | | | | | | | | | | | | | | | | | 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-253-3/+5
|\ | | | | | | | | | | | | 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-223-3/+5
| | | | | | | | Fixes: #21031
* | Merge topic 'cmake-P-path-args'Brad King2022-07-253-0/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | 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-223-0/+13
| | | | | | | | Fixes: #23748
* | Makefiles generator: dependencies messages in verbose modeMarc Chevrier2022-07-062-3/+3
|/ | | | Fixes: #23689
* Tests: Fix test failures for Windows Arm64 platformsNiyas Sait2022-05-111-1/+1
|
* CMake: Use FindPython instead of FindPythonInterp to build CMake itselfKyle Edwards2022-04-212-4/+4
| | | | Fixes: #23444
* Trace: process else and elseif commands correctlyBraulio Valdivielso Martinez2022-03-253-1/+15
| | | | | | | | | | | | | | | | | There have been two bugs reported about the `else` and `elseif` commands in the context of the tracing functionality and the json-v1 format (#23191 #22315). In essence, the reported traces referred to the layer of the stacktrace immediately on top of the expected ones. This MR fixes both issues. My solution adds a new parameter to the `PrintCommandTrace` function, `commandMissingFromStack`, that callers can specify if the command they want to report a trace for is not a regular part of the stack maintained in `cmMakefile`. This is only the case for `else` and `elseif`. The other bug is fixed by having the caller pass a `cmListFileBacktrace`, which helps in getting the right lines, file names... for the reported command. Fixes: #23191 #22315
* cmake: Add --fresh option to clear the cache and start from scratchBrad King2022-03-228-3/+47
| | | | | | | Simplify the workflow to re-run CMake from scratch as if a build tree were never before processed, regardless of whether it has been. Fixes: #23119
* Merge topic 'cmake-P-args'Brad King2022-03-183-4/+17
|\ | | | | | | | | | | | | | | 36056ff5a3 cmake: Improve acceptance of arbitrary arguments in -P script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7083
| * cmake: Improve acceptance of arbitrary arguments in -P script modeBrad King2022-03-173-4/+17
| | | | | | | | | | | | | | The fix in commit e4f1b301fe (cmake: Allow arbitrary args passed to CMake script, 2020-05-04, v3.18.0-rc1~211^2) only applied to "cache" arguments like `-DFOO`. Extend the fix to allow arbitrary arguments that collide with other CMake arguments like `-S` and `-B`.
* | Merge topic 'always_prefer_last_source_dir'Brad King2022-03-181-1/+1
|\ \ | |/ |/| | | | | | | | | | | b44ad7992a cmake: Always prefer the last source directory provided Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7084
| * cmake: Always prefer the last source directory providedRobert Maynard2022-03-171-1/+1
| | | | | | | | Fixes: #23334
* | Merge topic 'color-diagnostics'Brad King2022-03-094-0/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS 78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Frank Dana <ferdnyc@gmail.com> Merge-request: !6990
| * | color: Add tests for CMAKE_COLOR_DIAGNOSTICSBrad King2022-03-084-0/+19
| | |
* | | Merge topic 'cmake-dir-args'Brad King2022-03-0349-30/+84
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | d2e9478321 Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory 78e8f11456 cmake: Correct regression in `-B <dir> <src_dir>` 4091d5c58c Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs 1b97f8f35c Tests: Clarify RunCMake.CommandLine ExplicitDirs case names Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7030
| * | Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directoryBrad King2022-03-021-0/+6
| | | | | | | | | | | | | | | | | | | | | Verify that the work directory is not selected as the source or build tree. Issue: #23285
| * | cmake: Correct regression in `-B <dir> <src_dir>`Robert Maynard2022-03-021-0/+1
| | | | | | | | | | | | Fixes: #23285
| * | Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirsBrad King2022-03-0223-0/+47
| | |
| * | Tests: Clarify RunCMake.CommandLine ExplicitDirs case namesBrad King2022-03-0227-30/+30
| | |
* | | Merge topic 'correct_multiple_source_warnings'Brad King2022-02-187-0/+46
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 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-177-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | 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-1713-2/+23
|\ \ \ | |/ / | | / | |/ |/| | | | | | | 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-1613-2/+23
| | | | | | | | | | | | | | Don't treat empty quote arguments("") as the current working directory but instead ignore them. Fixes #23217
* | Trace: include `line_end` field in json-v1 formatBraulio Valdivielso Martinez2022-02-092-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After !6954 got merged, it has become easier for tools to get full stack-traces for runtime traces of a CMake program. The trace information already included in the JSON objects (line number, source file path) allows tools that display these stack traces to print the CMake source code associated to them. However, CMake commands may spawn multiple lines, and the JSON information associated to a trace only contains the line in which the command started, but not the one in which it ended. If tools want to print stack traces along the relevant source code, and they want to print the whole command associated to the stack frame, they will have to implement their own CMake language parser to know where the command ends. In order to simplify the life of those who want to write tooling for CMake, this commit adds a `line_end` field to the json-v1 trace format. If a given command spans multiple lines, the `line_end` field will contain the line of the last line spanned by the command (that of the closing parenthesis associated to the command).
* | Merge topic 'trace-global-frame'Brad King2022-02-093-3/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | a41d6e4d7a Trace: add global_frame field to json-v1 format Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6954
| * | Trace: add global_frame field to json-v1 formatBraulio Valdivielso Martinez2022-02-073-3/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tools using the json-v1 format might want to trace stack frames across different `CMakeLists.txt` files, in order to, for example, provide stacktraces that span from the top-level `CMakeLists.txt` in a project. One would think that `frame` lets you do that, but it doesn't, because it tells you the depth of the stack within the current `CMakeLists.txt`, so it gets reset across calls to `add_subdirectory`. The solution involves adding a field with a "global frame". This value gets incremented on calls to `add_subdirectory`, which makes it easier for tools to reconstruct "global stacktraces". I considered changing the current "frame" value, but I didn't because it would be a breaking change. I cannot think of any use-case where "frame" is more useful to "global-frame", but maybe I'm missing something.