Brad King
40b093649b
cmake: Avoid calling GetCMakeListFile with empty directory
2025-11-07 09:35:55 -05:00
Brad King
3593aa59ef
cmake: Replace working mode with role
2025-11-07 09:35:55 -05:00
Brad King
accfa7fa81
cmake: Infer command failure action from role
2025-11-07 09:35:55 -05:00
Brad King
e290d4f2a3
cmake: Infer command set from role
2025-11-07 09:35:54 -05:00
Brad King
ea5d04975e
cmake --build: Convert implementation to internal role
...
Previously it initialized as `PROJECT` to support reconfiguration with
VS generators, but didn't actually add any commands until needed.
Instead initialize as the `INTERNAL` role and update when adding
commands.
2025-11-07 09:35:54 -05:00
Brad King
57ea73f289
cmake: Load options scripts in script role
...
Some code paths load `.cmake` scripts to get `set(...)` options.
2025-11-07 09:35:54 -05:00
Brad King
0aab75bf0e
cmake: Clarify name of enum backing CMAKE_ROLE property
2025-11-07 09:35:53 -05:00
Brad King
9e36f22684
cmake: Clarify name of enum identifying set of commands added
2025-11-07 09:35:53 -05:00
Brad King
5078d5be4f
cmake: Clarify name of enum identifying try_compile
2025-11-07 09:35:53 -05:00
Brad King
e62cd22172
cmake: Avoid initializing with empty source and build paths
2025-11-07 09:35:53 -05:00
Brad King
4a2d32e7c4
cmake: Remove unnecessary initialization of empty source and build paths
...
The explicit initialization with empty paths from commit 57bdc1a2f7
(cmState: Compute and store directory components., 2015-05-04,
v3.3.0-rc1~61^2~4) has not been needed since commit 6afd35b98a (cmState:
remove unused code, 2016-06-16, v3.7.0-rc1~90^2).
2025-11-07 09:35:52 -05:00
Brad King
28610de96b
cmake --build: Consolidate role upgrade to reconfigure VS projects
2025-11-07 09:35:52 -05:00
Brad King
cc9290f983
cmake --build: Remove unnecessary source and build directory tracking
...
The save/restore from commit 427b6da9e5 (VS: Teach `cmake --build` to
reconfigure if needed before building, 2016-09-16, v3.8.0-rc1~290^2)
is unnecessary because `cmake::Build` does not rely on the source
and build directory being initialized.
2025-11-07 09:35:52 -05:00
Richard
3f7f2368d6
Avoid extra / in path to CMakeLists.txt in root directory
2025-10-22 09:22:23 -04:00
Martin Duffy
97adbc91fa
instrumentation: Move target data into content files
...
Create a single place to store target data to prevent duplication.
This moves `targetType` and `targetLabels` out of the snippet files
and into a target map in the `cmakeContent` file referenced by each
snippet.
Fixes : #27244
2025-10-02 09:28:20 -04:00
Brad King
a5d0c8e415
Merge topic 'workflow-crashing-step-detection'
...
2f653056af presets: Detect abnormal termination of workflow step commands
Acked-by: Kitware Robot <kwrobot@kitware.com >
Tested-by: buildbot <buildbot@kitware.com >
Merge-request: !11268
2025-10-01 08:38:11 -04:00
Craig Scott
2f653056af
presets: Detect abnormal termination of workflow step commands
...
If the command for a step (cmake, ctest, or cpack) terminates abnormally,
libuv sets the exit code to 0 and reports the process termination signal
in a separate struct member. That carries through to the structure we use
to track the process and ultimately give back to the workflow step loop.
Don't rely on the exit code alone to test for failure, also check for spawning
errors and abnormal termination too.
Fixes : #27273
2025-09-30 13:04:48 +10:00
Martin Duffy
f6714b8949
instrumentation: Trigger PostGenerate hook after FileApi replies are written
...
Fixes : #27268
2025-09-29 09:43:53 -04:00
Brad King
48957f9e16
Merge topic 'instrumentation-more-snippet-data'
...
2fdd1e787f instrumentation: Additional data in custom, install and link snippets
3db07b0189 cmInstallScriptHandler: Refactor to store config and path for each command
Acked-by: Kitware Robot <kwrobot@kitware.com >
Tested-by: buildbot <buildbot@kitware.com >
Merge-request: !11241
2025-09-26 09:34:20 -04:00
Brad King
0d1d6b0f63
Merge topic 'bootstrap-devirtualization'
...
ea04e19daf bootstrap: Fix compilation with gcc 16 devirtualization
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !11243
2025-09-25 09:00:41 -04:00
Brad King
ea04e19daf
bootstrap: Fix compilation with gcc 16 devirtualization
...
Avoid including a header for a subclass whose implementation is not
compiled during bootstrap.
Fixes : #27256
2025-09-24 17:20:35 -04:00
Martin Duffy
2fdd1e787f
instrumentation: Additional data in custom, install and link snippets
...
- Include `config` in all `install` and `custom` snippets
- Include `target` for `custom` snippets where applicable
- Document and test inclusion of `language` in `link` snippets
Issue: #27244
2025-09-24 16:39:09 -04:00
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