1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 15:32:10 +08:00
Commit Graph

1310 Commits

Author SHA1 Message Date
Alex Turbov
cb07358256 cmake_language: add TRACE subcommand
Closes 27235.
2025-09-23 03:02:03 +04:00
Brad King
cd46d8ec84 Merge branch 'backport-vs2026' into vs2026 2025-09-15 11:33:57 -04:00
Brad King
3392b371e2 VS: Add Visual Studio 18 2026 generator
Closes: #27213
2025-09-15 11:31:02 -04:00
Eduard Voronkin
01147454e7 FASTBuild: Add generator
Fixes: #15294
2025-08-26 14:29:01 -07:00
Martin Duffy
a249e820a8 instrumentation: Add file lock for build daemon
Prevent starting instrumentation build daemon and related hooks if one is
already running, and when during `cmake --build`.
2025-08-06 11:45:40 -04:00
Martin Duffy
9b65be6da5 instrumentation: Don't load query files before configure
Prevent the duplication of callbacks that came from loading instrumentation
queries both before and after configure.
2025-08-05 14:16:45 -04:00
Daniel Pfeifer
b1fdab3cc1 source: Pass small and trivially copyable types by value 2025-08-01 09:56:00 -04:00
Ben Boeckel
8180ecad9b autogen: support the SHORT intermediate dir strategy 2025-07-29 09:44:03 -04:00
Ben Boeckel
02b2153d84 cmGlobalGenerator: add a query to represent support for short object names 2025-07-28 12:01:28 -04:00
John Parent
392543384f cmake: support setting the intermediate dir strategy from the environment 2025-07-28 12:01:28 -04:00
John Parent
c6763bb021 ctest: support a new --objects-dir argument
When shorter object directories are used, CTest needs to know where to
look for artifacts.
2025-07-28 12:01:28 -04:00
Martin Duffy
9dec460c8c instrumentation: Store CDash settings in query files
Adds new `cdashSubmit` and `cdashVerbose` options to allow enabling
instrumentation in CDash submissions using query files or the
`cmake_instrumentation` command.

Fixes: #26783, #26727
2025-07-14 15:44:52 -04:00
Brad King
ed8513783c Merge topic 'instrumentation-fix'
e01d12c14f instrumentation: Prevent unnecessary query loading
f26f127183 instrumentation: Reuse single cmsys::SystemInformation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10863
2025-06-10 09:48:17 -04:00
Martin Duffy
e01d12c14f instrumentation: Prevent unnecessary query loading
Don't load queries from instrumentation directories when GetIsInTryCompile
or before ClearGeneratedQueries from previous configures has run.
2025-06-09 11:33:24 -04:00
Ben Boeckel
557c44b93e cmStrCat: use character literals where possible
Found and replaced using the `cmstrcat-to-char-literal` rule for
`ast-grep`.
2025-05-15 19:12:04 +02:00
Ben Boeckel
23779057fd cmStrCat: combine neighboring arguments where possible
Found using the `cmstrcat-adjacent-literals` rule for `ast-grep`.
2025-05-15 19:11:41 +02:00
Vitaly Stakhovsky
e991145430 Source: Avoid duplicate calls 2025-04-29 06:51:28 -04:00
Brad King
0cc962665b fileapi: Generate partial reply when buildsystem generation fails
In particular, the `configureLog` reply is useful for IDEs to read
`CMakeFiles/CMakeConfigureLog.yaml` when configuration fails.

Fixes: #26621
2025-04-14 10:42:03 -04:00
Daniel Pfeifer
46a0c04284 CTest: Allow setting exit code in ctest scripts 2025-03-20 16:31:49 +01:00
Brad King
2604f5d8b3 Merge topic 'json-errors-filename'
f134468a98 JSON: Improve JSON error message formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10463
2025-03-14 12:17:02 -04:00
Martin Duffy
f134468a98 JSON: Improve JSON error message formatting
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.

This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.

Issue: #26717
2025-03-13 10:44:31 -04:00
Brad King
d1792c48d5 cmake-gui: Suppress incidental error messages while choosing build tree
Avoid printing

    Error: <path> is not a directory

to the console for every update to the GUI's build directory widget.
2025-03-10 10:49:47 -04:00
Brad King
6f0ad398f1 cmake-gui: Clarify "Open Project" button implementation details 2025-03-10 10:48:24 -04:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot
de273b2e11 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Brad King
f0140a6e72 Merge topic 'policy-version-env'
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
04721acc6c Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in initial cache script
729470ff6d Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in script mode
6cd10ffed7 Tests: Cover CMAKE_POLICY_VERSION_MINIMUM as cache entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: John Parent <john.parent@kitware.com>
Merge-request: !10376
2025-02-21 09:13:01 -05:00
Brad King
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry.  That will make it
easier to use when `cmake` is invoked under layers of scripting.

Closes: #26715
2025-02-20 16:55:53 -05:00
Brad King
121b1f717a Merge topic 'instrumentation-presets-hooks'
45d3ffaa95 instrumentation: Use auto for variables holding closures
d75ccd9f8d instrumentation: Fix docs for ctest --collect-instrumentation option
a2232db802 instrumentation: Make hooks compatible with presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10352
2025-02-18 09:49:47 -05:00
Martin Duffy
45d3ffaa95 instrumentation: Use auto for variables holding closures 2025-02-17 11:08:30 -05:00
Martin Duffy
a2232db802 instrumentation: Make hooks compatible with presets 2025-02-17 11:03:28 -05:00
Brad King
7ac818927b Merge topic 'print-presets-log-level'
5303ad3823 Presets: Only print presets variables for verbose log level or higher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10315
2025-02-11 07:45:23 -05:00
Brad King
2baab9b99f Merge topic 'print-presets-log-level' into release-4.0
5303ad3823 Presets: Only print presets variables for verbose log level or higher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10315
2025-02-11 07:45:21 -05:00
Brad King
6e337e469c Merge topic 'instrumentation-build-config'
9689155a05 instrumentation: Add Config value to snippet data
ee3a55fc48 cmMakefileGenerator: Update GetConfigName to return const reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10300
2025-02-10 08:25:01 -05:00
Craig Scott
5303ad3823 Presets: Only print presets variables for verbose log level or higher
Fixes: #26664
2025-02-10 22:56:55 +11:00
Martin Duffy
9689155a05 instrumentation: Add Config value to snippet data 2025-02-09 12:29:09 -05:00
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
Brad King
7065e7a555 Merge topic 'instrumentation-build-hooks'
2680f30caf instrumentation: Allow multiple CALLBACK arguments
fc1d55f6a5 instrumentation: Add preBuild and postBuild hooks for ninja
f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
c57d1752d4 cmUVProcessChain: Add Detached option for spawning daemons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10230
2025-02-05 09:08:33 -05:00
Brad King
e2ab33d689 Merge topic 'instrumentation-ctest-find-labels'
1595713596 instrumentation: Fix expected location of Labels when using CTest launchers
d2a3d596d6 instrumentation: Fix expected location of Labels when using CTest launchers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10264
2025-02-04 08:51:11 -05:00
Martin Duffy
f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
Creates a global cmInstrumentation pointer on the CMake Instance to
prevent creating multiple instrumentation objects.
2025-02-03 10:10:06 -05:00
Martin Duffy
1595713596 instrumentation: Fix expected location of Labels when using CTest launchers 2025-02-03 09:08:44 -05:00
Daniel Pfeifer
7d2a6bc67d launchers: issue a message when rules are not defined 2025-01-31 14:04:02 +01:00
Martin Duffy
d2a3d596d6 instrumentation: Fix expected location of Labels when using CTest launchers 2025-01-30 14:07:49 -05:00
Daniel Tierney
abbe41578d cmake: Add SARIF diagnostics output support
Closes: #26587
2025-01-29 08:43:19 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* 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.

Issue: #26123
2025-01-23 13:09:50 -05:00
Brad King
381c446ff7 VS: Remove support for appending a platform to the generator name
Compatibility with CMake versions prior to 3.1 is no longer supported.

Fixes: #26481
2025-01-21 08:08:22 -05:00
Brad King
8ef1b4001b Merge topic 'remove-old-compatibility'
785523a136 Remove compatibility with CMake versions older than 2.8.0
35282387ea CMP0014: Remove support for OLD behavior
fad9c55b8b CMP0013: Remove support for OLD behavior
98a59ba8ad CMP0012: Remove support for OLD behavior
3c0dbb66f5 CMP0011: Remove support for OLD behavior
cf832e75bc CMP0010: Remove support for OLD behavior
77f8c374f3 CMP0009: Remove support for OLD behavior
43ef139567 CMP0008: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10188
2025-01-18 09:50:27 -05:00
Martin Duffy
9d34069ca8 instrumentation: Add targetLabels field to link snippets
Adds a new data field `targetLabels` to link snippets which contains a list of
text labels from the LABELS target property.
2025-01-17 11:07:30 -05:00
Brad King
03a215643d CMP0001: Remove support for OLD behavior 2025-01-17 09:28:35 -05:00
Brad King
8018f2a6c4 Merge topic 'instrumentation'
097d4fd1b5 instrumentation: Collect and record project build system metrics
8a3c195188 Tests/RunCMake: Add RunCMake_CHECK_ONLY Option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9791
2025-01-16 08:55:25 -05:00
Martin Duffy
097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00