Commit Graph
40122 Commits
Author SHA1 Message Date
Kitware Robot 68b467a889 CMake Nightly Date Stamp 2026-08-28 00:06:59 -04:00
Brad King e115b2047e Merge topic 'cm_unreachable'
09ded3a354 Help/dev: Note cm::unreachable and CM_UNREACHABLE
f460a199e3 Source: Add and use CM_UNREACHABLE macro
be415ecb74 Source: Add std::unreachable from C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12429
2026-08-27 10:54:50 -04:00
Brad King 7d7a68ccd9 Merge topic 'presets_add_configurePresetName_macro'
02dd870535 presets: Add configurePresetName macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12391
2026-08-27 10:41:06 -04:00
Brad King ba0f16f6cb Merge topic 'ewilde/ninja-refactor-swift-builds'
23b33482f1 Swift: Refactor module / object builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12438
2026-08-27 10:36:55 -04:00
Kitware Robot f3e773be3e CMake Nightly Date Stamp 2026-08-27 00:05:05 -04:00
Tyler Yankee f460a199e3 Source: Add and use CM_UNREACHABLE macro
In debug builds, we assert and abort to give more useful crashes for
development (i.e., instead of triggering UB). Otherwise, we get the
optimization benefits of `unreachable()` (or the older
platform-specific fallbacks per `cm/utility`).
2026-08-26 13:24:34 -04:00
Brad King 6ec33a4d0a Merge topic 'icstat-co-compile-source-file'
1470d96c44 IAR: Pass source file to C-STAT co-compile analysis

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12422
2026-08-26 09:21:14 -04:00
Kitware Robot 825bcff387 CMake Nightly Date Stamp 2026-08-26 00:04:54 -04:00
Maximilian Sander 02dd870535 presets: Add configurePresetName macro
Fixes: #28028
2026-08-25 14:33:10 -04:00
Brad King a584d8ed75 Merge topic 'system-env-id'
fc3c71d11f cmake: Add cached environment id that triggers reconfigure when changed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12420
2026-08-25 11:47:48 -04:00
Brad King b12192a593 Merge topic 'preset-template-helpers'
fffec0f86e presets: Extract common JSON field binds to helper
a1e4b92270 presets: Extract preset registration to helper
0029686e86 presets: Extract configure dependency resolution to helper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12428
2026-08-25 11:32:27 -04:00
Kitware Robot 65e2e7690e CMake Nightly Date Stamp 2026-08-25 00:05:10 -04:00
Aiden Woodruff fc3c71d11f cmake: Add cached environment id that triggers reconfigure when changed
The opaque `CMAKE_SYSTEM_ENVIRONMENT_ID` variable is cached during the
first invocation of `cmake` and is a user-defined hint about the state
of the environment. When the value changes, `cmake` either does nothing,
emits a warning (by default), or refreshes the cache as if by `--fresh`.
The action is controlled by the `CMAKE_SYSTEM_ENVIRONMENT_ACTION`
environment variable (which is not cached).

Implements: #28025
2026-08-24 15:06:35 -04:00
Brad King 244b563b43 Merge topic 'autogen-vs-reduce-target-count'
d963b87ab4 Autogen: Reduce the number of targets under Visual Studio
2b5ad7e395 Autogen: Register per-config timestamp file with its full path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12409
2026-08-24 12:31:33 -04:00
Brad King e903d46b9a Merge topic 'install-TARGETS-default-MODULE'
8072e80f4b install(TARGETS): Add default destination for MODULE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12403
2026-08-24 12:27:07 -04:00
Brad King 568b7bee83 Merge topic 'presets-list-defined'
2a9cde8b6e presets: Add defined listings with unavailable reasons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12367
2026-08-24 12:22:13 -04:00
Brad King 3ed98a45a8 Merge topic 'makefiles-output-sync'
e135fd8e44 Makefiles: Group parallel build output via GNU Make --output-sync

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12399
2026-08-24 12:19:01 -04:00
Brad King 7cc55e2db4 Merge topic 'ctest-repeat-number-of-runs'
135c7aa1f1 ctest: Add test rerun index "(run XX/YY)" to output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Taylor Braun-Jones <taylor@braun-jones.org>
Merge-request: !12392
2026-08-24 12:06:15 -04:00
Brad King 0b60b6ebbf Merge topic 'ccmake-backspace-field-edit-ctrl-h'
319eade1c2 ccmake: Accept Ctrl+H as Backspace in cache-entry field editor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Eyal Rozenberg <eyalroz1@gmx.com>
Merge-request: !12421
2026-08-24 12:00:48 -04:00
Brad King 73bb96d986 Merge topic 'jsonstate-install'
4f25560fc6 cmInstallScriptHandler: Remove unused JSON reader

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12415
2026-08-24 11:46:05 -04:00
Brad King eb708db6f8 Merge topic 'sphinx-copybutton'
392a79b910 Help/dev: Document use of sphinx-copybutton
1c5e70c9d0 bootstrap: Add --sphinx-html-copybutton option
1b1225a766 ci: Enable Sphinx copybutton for cmake.org and Sphinx jobs
6e2301357d ci: Add sphinx-copybutton extension to Fedora base image
ad5a65dd34 Utilities/Sphinx: Add option to build with copybutton
59875d4a08 Tests/FindImageMagick: Tolerate pre-release versions
45a426a4e3 codespell: Fix some hyphenated spellings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12424
2026-08-24 11:34:23 -04:00
Brad King cb3d63a245 Merge topic 'jsonstate-pkginforeader'
b14b613cec CPS: Use cmJSONState to read package JSON files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12414
2026-08-24 11:11:18 -04:00
Brad King cb89e8d15f Merge topic 'jsonstate-ninja'
26f6dab469 Ninja: Use cmJSONState for -E cmake_ninja_* commands
3796649167 cmJSONState: Avoid UB on empty error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12405
2026-08-24 11:06:43 -04:00
Kitware Robot b7b55e306b CMake Nightly Date Stamp 2026-08-24 00:10:44 -04:00
Tyler Yankee fffec0f86e presets: Extract common JSON field binds to helper 2026-08-23 07:25:05 -04:00
Tyler Yankee a1e4b92270 presets: Extract preset registration to helper 2026-08-23 07:25:05 -04:00
Tyler Yankee 0029686e86 presets: Extract configure dependency resolution to helper 2026-08-23 07:25:05 -04:00
Kitware Robot 30a6e89923 CMake Nightly Date Stamp 2026-08-23 00:05:48 -04:00
Kitware Robot 03676b051d CMake Nightly Date Stamp 2026-08-22 00:05:25 -04:00
Tyler Yankee 45a426a4e3 codespell: Fix some hyphenated spellings
These were surfaced by an updated `codespell` in the `spellcheck` CI
base image.
2026-08-21 09:43:48 -04:00
Maxime HaselbauerandTyler Yankee 135c7aa1f1 ctest: Add test rerun index "(run XX/YY)" to output
This makes the output more user friendly when using CTest's repeat
options (`until-fail`, `until-pass` `after-timeout`).

Closes: #28039
Co-authored-by: Tyler Yankee <tyler.yankee@kitware.com>
2026-08-21 09:11:52 -04:00
Brad King e2a8abcb03 Merge topic 'update-kwsys'
21063dc0c0 Merge branch 'upstream-KWSys' into update-kwsys
32911ff9d2 KWSys 2026-08-21 (c1021f19)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12418
2026-08-21 08:56:01 -04:00
Brad King 21063dc0c0 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2026-08-21 (c1021f19)
2026-08-21 08:52:45 -04:00
Kitware Robot c5a5c4a6e2 CMake Nightly Date Stamp 2026-08-21 00:07:47 -04:00
15daksh-2003 1470d96c44 IAR: Pass source file to C-STAT co-compile analysis
The <LANG>_ICSTAT co-compile appended --source= only when another
linter (tidy/cpplint/cppcheck/pvs) was also active, so a C-STAT-only
target ran `icstat analyze "" -- ...` with an empty file argument.
Add icstat to the --source= condition so C-STAT gets the real path.

Fixes: #28045
2026-08-21 00:55:59 +05:30
15daksh-2003 319eade1c2 ccmake: Accept Ctrl+H as Backspace in cache-entry field editor
Some terminals (and native-Windows PDCurses) send ^H (0x08) for
Backspace, which the field editor left unhandled while the search
field already accepted it.  Recognize ctrl('h') alongside 127 and
KEY_BACKSPACE.

Fixes: #27573
2026-08-20 20:15:11 +05:30
Tyler Yankee 26f6dab469 Ninja: Use cmJSONState for -E cmake_ninja_* commands
This approach will be more portable.
2026-08-20 08:38:56 -04:00
Tyler Yankee 3796649167 cmJSONState: Avoid UB on empty error message
The caller for `GetErrorMessage` _should_ only be calling this method
if there actual errors (i.e., `!errors.empty()`). However, in the
incidental absence of the intended usage, avoid `pop_back` on an empty
string.
2026-08-20 08:37:00 -04:00
Kitware Robot 419e5f0d6b CMake Nightly Date Stamp 2026-08-20 00:05:54 -04:00
Tyler Yankee b14b613cec CPS: Use cmJSONState to read package JSON files
This approach will be more portable.
2026-08-19 19:05:07 -04:00
Maximilian Sander 2a9cde8b6e presets: Add defined listings with unavailable reasons
Add workflow and per-type defined values to cmake --list-presets.
Each -defined value lists every non-hidden preset of the selected type
and explains why unavailable presets cannot be used. The defined value
is an alias for configure-defined.

Support --list-presets=defined in cmake build and workflow modes,
ctest, and cpack. Propagate configure preset unavailability to
dependent build, test, package, and workflow presets.

Fixes: #28016, #26118
2026-08-19 16:47:50 +02:00
Kitware Robot 80066f9851 CMake Nightly Date Stamp 2026-08-19 00:18:01 -04:00
Tyler Yankee 4f25560fc6 cmInstallScriptHandler: Remove unused JSON reader 2026-08-18 14:09:56 -04:00
Kitware Robot b13cdb037c CMake Nightly Date Stamp 2026-08-18 00:07:21 -04:00
Kitware Robot f0952e573f CMake Nightly Date Stamp 2026-08-17 00:05:43 -04:00
Kitware Robot 7bb8d9da1f CMake Nightly Date Stamp 2026-08-15 00:05:23 -04:00
Evan Wilde 23b33482f1 Swift: Refactor module / object builds
Splitting up the computation of common variables, module build
variables, and object build variables to make it a little easier to
focus on each one.

Updated tests to reflect updated flag order and updated object-build
description.
2026-08-14 17:02:20 -07:00
Joerg Bornemann d963b87ab4 Autogen: Reduce the number of targets under Visual Studio
Commit 680fbb112a (Autogen: Enable depfile support for Visual Studio and
Xcode generators) disabled the PRE_BUILD optimization when a depfile is
used, because a PRE_BUILD event cannot carry depfile dependencies. Since
then, every target with AUTOMOC or AUTOUIC enabled gains an
'<ORIGIN>_autogen' and an '<ORIGIN>_autogen_timestamp_deps' target,
which the Visual Studio generators turn into two extra projects per
target in the generated solution.

Attach the autogen custom command to the origin target instead. The
custom command still carries the depfile, and the dependencies of the
origin target provide the ordering that
'<ORIGIN>_autogen_timestamp_deps' provides otherwise, because MSBuild
builds all referenced projects before any step of the referencing
project.

Use the conditions of the PRE_BUILD event, so that the
'<ORIGIN>_autogen' target keeps existing wherever it existed before
depfiles were enabled for the Visual Studio generators. In particular,
projects that name the target in add_dependencies() keep working.

Ninja and the Makefile generators keep the separate targets. Extra
targets have no cost for them, and '<ORIGIN>_autogen' has always existed
there.

The Xcode generator gained the same two targets per origin target in
4.4, but attaching the custom command there needs some more thoughts on
the per-config timestamp file first: Xcode rejects targets whose sources
vary by configuration, and with AUTOGEN_BETTER_GRAPH_MULTI_CONFIG the
timestamp file is per configuration.

Fixes: #28034
Fixes: #28033
2026-08-14 13:14:54 +02:00
Brad King 03f6a7f440 Merge topic 'jsonstate-builddb'
e42cde3405 cmBuildDatabase: Use cmJSONState to read mcdb's

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12406
2026-08-14 06:40:09 -04:00
Brad King 450f54656e Merge topic 'jsonstate-vs-flagtable'
e2da85c672 VS: Use cmJSONState to read flag table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12404
2026-08-14 06:38:43 -04:00