Commit Graph

72899 Commits

Author SHA1 Message Date
Brad King e290d4f2a3 cmake: Infer command set from role 2025-11-07 09:35:54 -05:00
Brad King bfaaec6179 cmake --workflow: Convert implementation to internal role
Previously it initialized as `PROJECT` but didn't actually add any
commands.  This was likely copied from the `--build` implementation,
which has since been converted to `INTERNAL` too.
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 0b83750e14 cmake: Clarify name of role of internal instances
These instances do not run arbitrary cmake language code.
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
Brad King c3b4462147 cmCMakeLanguageCommand: Drop always-true condition 2025-11-07 09:35:52 -05:00
Brad King 1a8390f768 Merge branch 'release-4.2' 2025-11-07 09:20:34 -05:00
Brad King ff5d7eb498 Merge topic 'ci-fedora-43'
a61ef50ea6 ci: Update Fedora 43 base image to get bzr and flang fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11393
2025-11-07 09:20:33 -05:00
Brad King 7808d9e4ab Merge topic 'ci-fedora-43' into release-4.2
a61ef50ea6 ci: Update Fedora 43 base image to get bzr and flang fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11393
2025-11-07 09:20:32 -05:00
Brad King 063f578880 Merge branch 'release-4.2' 2025-11-07 09:18:17 -05:00
Brad King c7ba476337 Merge topic 'gtest-discovery-race-condition'
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11392
2025-11-07 09:18:17 -05:00
Brad King c77f7b1d3f Merge topic 'gtest-discovery-race-condition' into release-4.2
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11392
2025-11-07 09:18:15 -05:00
Kitware Robot b8de18df08 CMake Nightly Date Stamp 2025-11-07 00:09:13 -05:00
Brad King a61ef50ea6 ci: Update Fedora 43 base image to get bzr and flang fixes
* breezy: https://bugzilla.redhat.com/show_bug.cgi?id=2366194
* flang: https://bugzilla.redhat.com/show_bug.cgi?id=2401176
2025-11-06 15:46:52 -05:00
Brad King 72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()
Fix commit 6680df042e (GoogleTest: Avoid POST_BUILD race condition for
gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2) to actually hash
the target name instead of an empty string.

Fixes: #27319
2025-11-06 14:28:30 -05:00
Brad King 073d0b50d0 Merge branch 'release-4.2' 2025-11-06 13:26:13 -05:00
Brad King b95d5b31ab Merge topic 'fix-cps-crash-on-bad-input'
fa4bed7844 cmPackageInfoReader: Don't crash if input is malformed
be99a82eee cmPackageInfoReader: Just use std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11390
2025-11-06 13:26:13 -05:00
Brad King 38095c2da5 Merge topic 'fix-cps-crash-on-bad-input' into release-4.2
fa4bed7844 cmPackageInfoReader: Don't crash if input is malformed
be99a82eee cmPackageInfoReader: Just use std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11390
2025-11-06 13:26:10 -05:00
Brad King 1736cf85c0 Merge branch 'release-4.2' 2025-11-06 13:24:38 -05:00
Brad King 55b083c4a6 Merge topic 'improve-cps-find_package-failure-reporting'
6c2fc502b6 find_package: Report why a candidate was rejected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11377
2025-11-06 13:24:38 -05:00
Brad King 6b03947c2c Merge topic 'improve-cps-find_package-failure-reporting' into release-4.2
6c2fc502b6 find_package: Report why a candidate was rejected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11377
2025-11-06 13:24:36 -05:00
Brad King 74759099e9 Merge topic 'file-CREATE_LINK-COPY_ON_ERROR-dir'
7136da86cb Help: Add release note for policy CMP0205

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11391
2025-11-06 13:22:08 -05:00
Kitware Robot 6b0663f860 CMake Nightly Date Stamp 2025-11-06 00:07:04 -05:00
Brad King 7136da86cb Help: Add release note for policy CMP0205
This was missed in commit a73ddd2ddb (file(CREATE_LINK): Implement
COPY_ON_ERROR for directories, 2025-10-15).
2025-11-05 16:05:04 -05:00
Matthew Woehlke fa4bed7844 cmPackageInfoReader: Don't crash if input is malformed
Check all instances of converting a JSON value to a string to ensure
that we check first if the value is convertible, in order to avoid an
exception being thrown, which crashes CMake. Modify some instances to
report when we encounter such invalid values. (Many instances, however,
just silently ignore invalid values.)

Fixes: #27350
2025-11-05 11:29:13 -05:00
Matthew Woehlke be99a82eee cmPackageInfoReader: Just use std::string
Change cmPackageInfoReader::SetMetaProperty to just take the property
name as a std::string. We end up constructing one when we call
cmTarget::SetProperty, so we might as well do it up front and be done
with it. (Before, we were converting a string_view to char*, which is
decidedly non-optimal.)
2025-11-05 10:46:09 -05:00
Matthew Woehlke 6c2fc502b6 find_package: Report why a candidate was rejected
Improve how find_package reports the list of candidate package
configuration files that were considered but rejected to include a
reason for rejection. For CPS in particular, this allows the user to
tell if a CPS file was rejected due to a version mismatch, missing
required components, or because the file could not be read.

While we do not try to report more detail for why cmPackageInfoReader
rejected a file, the possible reasons are usually easy enough to
distinguish:

- The file is so malformed that we cannot read a JSON object.
- The schema version is not a version that CMake understands.
- The root object does not contain a string named "name".
- The root object does not contain an object named "components".
- Prefix resolution failed.

Three of these can only result from a file that fails schema validation.
2025-11-05 10:45:23 -05:00
Brad King 303ffae24f Merge topic 'deprecate-CMAKE_ENABLE_EXPORTS'
33d9146472 CMAKE_ENABLE_EXPORTS: Deprecate variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11381
2025-11-05 10:25:26 -05:00
Brad King 7bcdf7353a Merge topic 'ci-macos-qt-6.9.3'
3f21bf9f0a ci: Restore packaging with macOS SDK from Xcode
c1ee4d57dc Utilities/Release: Remove unused Qt 5.15.2 build script for macOS
0f18aa010e ci: Update to Qt 6.9.3 on macOS
2ae318bb5d cmake-gui: Install only necessary plugins for Qt 6
74dec2c7fd cmake-gui: Detect Qt lib directory on macOS more robustly
0d1321770d cmake-gui: Clarify signature of QCheckBox::checkStateChanged callbacks
a49e5c8eb9 Utilities/Release: Teach macOS notarization script to sign Qt artifacts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11386
2025-11-05 10:22:20 -05:00
Kitware Robot 1463723e4a CMake Nightly Date Stamp 2025-11-05 00:06:13 -05:00
Peter Kokot 33d9146472 CMAKE_ENABLE_EXPORTS: Deprecate variable
This makes it more clear which variable should be used.

Fixes #27357
2025-11-04 20:07:39 +01:00
Brad King 153d9c2067 Merge branch 'release-4.2' 2025-11-04 13:33:51 -05:00
Brad King 543ca7f081 Merge topic 'improve-codespell'
7cc114601a codespell: Prune ignore list
d197474083 codespell: Ignore test output regexes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11388
2025-11-04 13:33:50 -05:00
Brad King 6ece8dee79 Merge topic 'improve-codespell' into release-4.2
7cc114601a codespell: Prune ignore list
d197474083 codespell: Ignore test output regexes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11388
2025-11-04 13:33:49 -05:00
Matthew Woehlke 7cc114601a codespell: Prune ignore list
Remove entries from the codespell ignore list that do not seem to be
present any more. Also, remove a deliberate typo and instead add a local
annotation to ignore it.

This list is still uncomfortably long, but unfortunately current
versions of codespell do not offer any granularity in between annotating
individual uses (which is not practical in most cases) or globally
ignoring words (which is overly broad and risks missing real errors).
2025-11-04 13:13:09 -05:00
Matthew Woehlke d197474083 codespell: Ignore test output regexes
Ignore RunCMake output regexes (i.e. *-stdout.txt, *-stderr.txt) when
checking spelling. Because these are regular expressions, they have a
higher likelihood of having false positives, and because they are
expected output, any text they contain ought to also appear in whatever
code generates it (or else, is probably text that depends on user input
and shouldn't be spell-checked anyway).
2025-11-04 13:12:56 -05:00
Brad King 8d16842e33 Merge topic 'file-CREATE_LINK-COPY_ON_ERROR-dir'
a73ddd2ddb file(CREATE_LINK): Implement COPY_ON_ERROR for directories
f719a36bc0 file(CREATE_LINK): Refactor error handling for removal of destination
0448f646a8 file(CREATE_LINK): Factor out dedicated test
a2a626055b cmSystemTools: Return KWSys Status from RepeatedRemoveDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11311
2025-11-04 12:02:47 -05:00
Brad King cdbc2f6f17 Merge topic 'patch-GNUInstallDirs-DATADIR'
c05e60ecb2 GNUInstallDirs: Add more info about DATADIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11378
2025-11-04 12:00:34 -05:00
Brad King 50b1346faa Merge branch 'release-4.2' 2025-11-04 11:24:41 -05:00
Brad King 8a2f0e819b Merge topic 'typos-1.39.0'
1405dc49e8 pre-commit: version bump `typos` and `sphinx-lint` hooks + fix found typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11380
2025-11-04 11:24:40 -05:00
Brad King 519d69c92c Merge topic 'typos-1.39.0' into release-4.2
1405dc49e8 pre-commit: version bump `typos` and `sphinx-lint` hooks + fix found typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11380
2025-11-04 11:24:30 -05:00
Brad King 6b0074e2d0 Merge branch 'release-4.2' 2025-11-04 10:47:08 -05:00
Brad King 070ddd6732 Merge topic 'fbuild_fix_superfluous_dirs'
2a5855f034 FASTBuild: fix superfluous directory creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11379
2025-11-04 10:47:08 -05:00