Commit Graph

273 Commits

Author SHA1 Message Date
Nikita Nemkin
ddf7ebe06e cmake: Friendlier message when trying to --build the wrong dir
Also for --open.

Fixes: #11166
2025-02-07 10:56:05 -05:00
Peter Kokot
9f2efc3270
Remove optional arguments from else() and end*() commands
This adds a brief explanation of the optional condition in the `else()`
and removes all legacy usages of `else()` and `end*()` commands.
2025-01-28 03:01:23 +01:00
Brad King
1150fae89a CMP0053: Remove support for OLD behavior 2025-01-20 09:46:55 -05:00
Brad King
a62313b1dd Tests: Fix testing with MinGW without VS installed 2025-01-15 08:21:31 -05:00
Garrett Campbell
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
Closes: #16478
2024-12-10 09:04:31 -05:00
Brad King
6042b5164a Tests/RunCMake/CommandLine: Match initial cache paths more precisely 2024-10-22 11:21:10 -04:00
Brad King
f4aa34daa7 Tests/RunCMake: Update cmake_minimum_required versions to 3.10
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.10 where possible.
2024-10-03 11:52:22 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King
810e33f67a Tests: Simplify tests for Visual Studio generators
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.
2024-08-28 14:12:54 -04:00
Brad King
077691942a Merge topic 'cmake-list-cached-variables'
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
2024-07-24 10:00:30 -04:00
Min Hsu
c55239e286 cmake: Add flag to list cache entries matching a regex
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.
2024-07-23 10:19:22 -04:00
Martin Duffy
5b3fbd5f64 cmSystemTools: Add CMake config directory 2024-07-03 09:34:41 -04:00
Brad King
7330121467 Fix crash in target-specific commands called from initial cache script
Fixes: #26018
2024-06-01 06:28:26 -04:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Arctic Lampyrid
6116bcb066 fileapi: Add CONFIGURE_DEPENDS glob info to cmakeFiles object
Fixes: #25668
Co-authored-by: Brad King <brad.king@kitware.com>
2024-03-19 14:55:25 -04:00
Silvio Traversaro
06af18b9db cmake: Allow CMAKE_INSTALL_PREFIX to be set by environment variable
Fixes: #25023
2024-01-30 11:44:45 -05:00
Cristian Le
fa00928bcd file: STRINGS + REGEX store match results
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-01-09 16:36:55 -05:00
Ralf Habacker
80a64c9ce5 fileapi: Add cross-compiling emulator to codemodel-v2
Fixes: #25408
2023-12-01 10:57:15 -05:00
Brad King
530deed998 Merge topic 'cmake-E-cat-stdin'
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
2023-11-06 10:35:45 -05:00
Kyle Edwards
ab72846794 cmake -E cat: Add ability to print standard input 2023-11-03 09:03:25 -04:00
Kyle Edwards
c4be9c914b cmSystemTools::RunSingleCommand(): Pass stdin to child process
Fixes: #25383
2023-11-02 10:04:00 -04:00
Brad King
b3205afcde Merge topic 'help-arbitrary'
4e50320978 Help: Allow help for arbitrary keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8674
2023-09-29 09:36:24 -04:00
Martin Duffy
4e50320978 Help: Allow help for arbitrary keywords
Changes `cmake --help [arg]` to search `Help/*/` instead of `Help/command/`
Allows editors to easily display manual for `<cword>`
2023-09-27 18:01:12 -04:00
scivision
ca77b745e9 cmake: Clarify error if -P script does not exist 2023-09-18 11:51:31 -04:00
Brad King
75b573a628 Deprecate Visual Studio 12 2013 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-06-26 12:41:18 -04:00
Brad King
536c1de1d4 Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25.  Remove it.
2023-06-13 14:20:48 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- 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>
2023-05-30 09:46:12 -04:00
Marc Chevrier
b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks
Fixes: #19897
2023-05-19 12:10:20 +02:00
scivision
848f7b0a81 cmake -E time: use C++11 chrono and better format output
fixes #24415
2023-02-15 10:53:14 -05:00
Brad King
1edf138506 Tests/RunCMake: Update cmake_minimum_required versions
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`.
2023-02-11 06:24:22 -05:00
Brad King
536f35c4f1 Merge topic 'vs9-deprecate'
d7f440c5db Deprecate Visual Studio 9 2008 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8181
2023-02-09 10:14:10 -05:00
Robert Maynard
f9e8a067c2 cmake: Stop parsing after -- when detecting script mode
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
2023-02-08 17:21:10 -05:00
Brad King
d7f440c5db Deprecate Visual Studio 9 2008 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-02-08 11:49:27 -05:00
Kitware Robot
33abef7416 Revise C++ coding style using clang-format-15
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 15.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Fixes: #24315
2023-01-18 16:20:47 -05:00
Brad King
48639aa8fc clang-format.bash: Use generic clang-format attribute
Specify the clang-format version in the attribute value instead of its
name.

Issue: #24315
2023-01-18 11:48:49 -05:00
Robert Maynard
c1170b5602 cmake: Add -E copy_directory_if_different
Fixes #21584
2023-01-12 08:39:41 -05:00
Brad King
d811d86fd7 FileAPI: Add "configureLog" object kind
Provide clients with a way to get a known set of configure log event
versions.

Issue: #23200
2022-12-17 08:52:04 -05:00
Brad King
3b4337adc7 Merge topic 'clang-tidy-export-fixes-dir'
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
2022-12-07 08:19:53 -05:00
Robert Maynard
08aa516880 cmake: Stop parsing after -- when detecting script mode
Fixes #24220
2022-12-06 13:04:31 -05:00
Kyle Edwards
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
2022-12-06 10:39:29 -05:00
Brad King
eda68d229d Merge topic 'cmake-E-copy-t-mode'
8d9069e5b6 cmake -E copy: Add support for -t argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7913
2022-11-15 09:14:07 -05:00
Brad King
6f9544736a Merge topic 'better_handling_of_build_args'
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
2022-11-15 08:55:19 -05:00
Kyle Edwards
8d9069e5b6 cmake -E copy: Add support for -t argument
Fixes: #23543
2022-11-15 07:47:07 -05:00
Robert Maynard
01611f8258 cmake: --build improve detection of no build dir
Fixes #24157
2022-11-14 10:46:17 -05:00
friendlyanon
59573bf5b9 project: Warn at top-level if cmake_minimum_required wasn't called
The top-level project() call will now issue an AUTHOR_WARNING if it
wasn't called after cmake_minimum_required().

Fixes: #24071
2022-11-11 22:49:36 +01:00
Ben Boeckel
b3e9fb67bb file-api: support exporting file set information
This includes listing the filesets themselves as well as which file set
(if any) each source file is associated with.

Fixes: #24128
2022-11-08 10:07:10 -05:00
Brad King
4180159758 Tests: Provide RunCMake.CommandLine compare_files data more robustly
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.
2022-10-31 10:50:33 -04:00
Juan Ramos
3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output 2022-10-20 19:53:14 -06:00
Matthew Woehlke
5ba51621af try_compile: Propagate --trace through try_compile
Add ability to specify another cmake instance from which to get the
trace output target. Use this during try_compile.
2022-10-11 12:10:18 -04:00
Matthew Woehlke
7e6b2a92a0 try_compile: Report build dir with --debug-trycompile
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
2022-10-06 08:13:03 -04:00