Commit Graph

37248 Commits

Author SHA1 Message Date
Ben Boeckel
0122e02293 Ninja: Add COMMENT to custom command and target descriptions
Fixes: #15461
2025-03-03 11:58:21 -05:00
Ben Boeckel
30fb5b1b22 Ninja: add COMMENT to build statement descriptions
This allows users to recognize that something more than the basic action
is happening.

See: https://groups.google.com/g/ninja-build/c/Tv4wu2IBMdo
Issue: #15461
2025-03-03 11:58:13 -05:00
Brad King
e2f03680b3 Merge branch 'backport-license-rst' into license-rst 2025-03-03 10:43:55 -05: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
Brad King
67b6964efa Merge branch 'backport-license-rst' (early part) into license-rst 2025-03-03 10:42:50 -05:00
Brad King
8d83487e60 CONTRIBUTORS: Factor contributors list out of license file
It is more conventional to list contributors in a dedicated file.
Also drop the long out-of-date sponsorship section.
2025-03-03 09:56:17 -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
2d42a5444f LICENSE: Rename Copyright.txt to LICENSE.rst
The name `LICENSE` is now more conventional.
Format as reStructuredText to improve rendering.
2025-03-03 09:55:56 -05:00
Brad King
3035ee4ff3 CMake: De-duplicate extraction of copyright line from license file 2025-03-03 08:59:09 -05:00
Brad King
068ea4bfc1 cmake-gui: Update credits in About dialog to reflect status quo 2025-03-03 08:59:08 -05:00
Brad King
a625829b26 Merge topic 'update-kwsys'
547c42b294 Merge branch 'upstream-KWSys' into update-kwsys
25ea535aba KWSys 2025-03-01 (1d82baee)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !10408
2025-03-03 08:52:29 -05:00
Kitware Robot
b22079b657 CMake Nightly Date Stamp 2025-03-03 00:07:04 -05:00
Kitware Robot
993220d58f CMake Nightly Date Stamp 2025-03-02 00:08:11 -05:00
Brad King
547c42b294 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-03-01 (1d82baee)
2025-03-01 10:06:13 -05:00
Kitware Robot
b98105534a CMake Nightly Date Stamp 2025-03-01 00:05:45 -05:00
Brad King
75da788360 Merge topic 'find-package-required'
857a039d66 find_*: Add variable to default calls to REQUIRED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10364
2025-02-28 11:15:23 -05:00
Brad King
7f850fba3c Merge topic 'rel-sunos'
5dd973f900 ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries
fd1907e50e Utilities/Release: Convert base images to build sunos-{x86_64,sparc64}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10401
2025-02-28 11:09:49 -05:00
Kitware Robot
2e8cef8237 CMake Nightly Date Stamp 2025-02-28 00:06:53 -05:00
Brad King
5dd973f900 ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries 2025-02-27 16:35:09 -05:00
Martin Duffy
857a039d66 find_*: Add variable to default calls to REQUIRED
This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`,
`find_path`, `find_file`, `find_library` and `find_program` to be
considered `REQUIRED` by default.

It also introduces an `OPTIONAL` keyword to those commands, allowing
them to ignore the value of this variable.

Issue: #26576
2025-02-27 10:51:07 -05:00
Brad King
fafe7f280f Merge topic 'export-cps-build'
c8ccd5a9e3 export: Add build-tree CPS support
4577e06d91 cmExportCommand: Tag arguments that shouldn't be empty
9d83a1ed1f Tests: Rename certain CPS tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10395
2025-02-27 09:29:32 -05:00
Brad King
c493e8b6de Merge topic 'string-TIMESTAMP-2038'
74519e1c83 string(TIMESTAMP): Fix %s placeholder for year 2038 on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10389
2025-02-27 09:26:22 -05:00
Kitware Robot
85f543a473 CMake Nightly Date Stamp 2025-02-27 00:08:11 -05:00
Brad King
3bdf63e84d Merge topic 'cmake-gui-reload-presets'
74be7f5d79 cmake-gui: Add 'Reload Presets' button, replacing reload timer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10361
2025-02-26 08:44:31 -05:00
Brad King
67f7b5935b Merge topic 'add-custom-command-xcode16-depends'
2dc8c1d45f Xcode: Fix POST_BUILD order in bundle targets on Xcode 16+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10345
2025-02-26 08:40:32 -05:00
Brad King
74519e1c83 string(TIMESTAMP): Fix %s placeholder for year 2038 on Windows
`difftime` returns a `double`, so commit 6727270b75 (CMake: Extend
TIMESTAMP sub-commands with new unix time format specifier, 2016-02-16,
v3.6.0-rc1~338^2) cast it to `long` to get an integer result.  However,
in the MSVC ABI, `long` is a 32-bit integer.  Use an explicit 64-bit
integer type instead.

Fixes: #26716
2025-02-26 08:14:56 -05:00
Kitware Robot
16a253ef22 CMake Nightly Date Stamp 2025-02-26 00:06:04 -05:00
Matthew Woehlke
c8ccd5a9e3 export: Add build-tree CPS support
Add Common Package Specification support to export(EXPORT).
2025-02-25 15:42:23 -05:00
Matthew Woehlke
4577e06d91 cmExportCommand: Tag arguments that shouldn't be empty
Tweak some of the argument parsing in cmExportCommand.cxx to use
ArgumentParser::NonEmpty tags on named options that require a non-empty
value.
2025-02-25 12:18:13 -05:00
Brad King
4972938b7d CMake 4.0.0-rc2 2025-02-25 10:56:02 -05:00
Will Bowers
74be7f5d79 cmake-gui: Add 'Reload Presets' button, replacing reload timer
Previously the presets handler in the GUI was on a timer.  Because of
this, error messages got suppressed after the first one (even if the
error message is different from the one originally suppressed).

Add a "reload presets" button which forces the preset to reload, and
always provides an error message if the reload failed.

Fixes: #26707
2025-02-25 08:20:59 -07:00
Brad King
40ed8752ef Merge topic 'genex-transitive-link-libraries'
b3da9c6d60 GenEx: Evaluate LINK_LIBRARIES target properties transitively

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10391
2025-02-25 10:08:14 -05:00
Brad King
18e041b28e Merge topic 'fix-export-export-info'
26691689a3 export: Allow compatible build-tree exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10392
2025-02-25 10:06:46 -05:00
Brad King
b1c592acc8 Merge topic 'add-dependency-one-arg'
609c949061 add_dependencies: Allow calling with no dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10372
2025-02-25 10:05:19 -05:00
Brad King
cdc1621013 Merge topic 'windows-export-bigobj'
08ca4fbc7a WINDOWS_EXPORT_ALL_SYMBOLS: Distinguish bigobj from cl -GL objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10382
2025-02-25 10:02:35 -05:00
Brad King
40bc9bfdac Merge topic 'find_package-sort-direction'
0e2b87244c find_package: Fix CMAKE_FIND_PACKAGE_SORT_DIRECTION documented default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10390
2025-02-25 09:53:37 -05:00
Brad King
4af0f637c4 Merge topic 'instrumentation-quote-command'
4e7b37cad3 instrumentation: Quote command arguments to preserve separation
99cd4d979b CTest: Fix startTime in test snippets when using instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10386
2025-02-25 09:38:52 -05:00
Alexandra Cherdantseva
2dc8c1d45f Xcode: Fix POST_BUILD order in bundle targets on Xcode 16+
XCode 16+ no longer delays our POST_BUILD phase until after bundle files
like `Info.plist` are generated.  Teach the Xcode generator to add
explicit dependencies to the POST_BUILD phase in bundle targets to
ensure the files are created before it runs.

Fixes: #26656
2025-02-25 08:15:12 -05:00
Kitware Robot
8cf08653f2 CMake Nightly Date Stamp 2025-02-25 00:08:29 -05:00
Hongxu Xu
0e2b87244c find_package: Fix CMAKE_FIND_PACKAGE_SORT_DIRECTION documented default
Previously the documentation said the default was `DEC`,
but the implementation has always defaulted to `ASC`.

Fixes: #22728
2025-02-24 15:03:34 -05:00
Matthew Woehlke
26691689a3 export: Allow compatible build-tree exports
Modify how cmExportBuildFileGenerator::FindExportInfo collects target
export information to properly record the export sets which export a
target. (The old behavior treated every invocation as a separate set,
which is reasonable for export(TARGETS) but does not allow referencing a
target exported multiple times via export(EXPORT). This reflects recent
changes to allow this for installed exports.)
2025-02-24 14:54:50 -05:00
Xuntao Chi
08ca4fbc7a WINDOWS_EXPORT_ALL_SYMBOLS: Distinguish bigobj from cl -GL objects
The MSVC `/GL` flag generates an object of type `ANON_OBJECT_V1`.
`bigobj` has version >= 2.

Fixes: #25798
2025-02-24 14:37:16 -05:00
Martin Duffy
609c949061 add_dependencies: Allow calling with no dependencies
Fixes: #26713
2025-02-24 13:56:31 -05:00
Martin Duffy
4e7b37cad3 instrumentation: Quote command arguments to preserve separation
Fixes: #26702
2025-02-24 13:11:19 -05:00
Martin Duffy
99cd4d979b CTest: Fix startTime in test snippets when using instrumentation
Initialize SystemStartTime for TestProcess.
2025-02-24 11:50:11 -05:00
Brad King
b3da9c6d60 GenEx: Evaluate LINK_LIBRARIES target properties transitively
The `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` target properties
establish the graph of link dependencies used to propagate usage
requirements transitively.  Therefore the `$<TARGET_PROPERTY:...>`
generator expression should evaluate them transitively as it does for
other transitive properties.  Add policy CMP0189 for compatibility.

Fixes: #26709
Issue: #12435
2025-02-24 11:43:47 -05:00
Brad King
859ca5c4d7 CMake 3.31.6 2025-02-24 10:53:17 -05:00
Brad King
2bd6fbe1b0 CMake 3.30.8 2025-02-24 10:09:52 -05:00
Brad King
f48beab388 Merge topic 'custom-transitive-properties'
77c7397ab4 Merge branch 'backport-3.31-custom-transitive-properties'
478d6cfd9a Merge branch 'backport-3.30-custom-transitive-properties'
8b5af40b34 GenEx: Fix evaluation of LINK_LIBRARIES as custom transitive property
161f703e76 GenEx: Restore evaluation context for conditional transitive properties
419c19d531 Tests: Extend CustomTransitiveProperties with custom transitive LINK_LIBRARIES
ff2004d430 Tests: Extend CustomTransitiveProperties with non-transitive LINK_LIBRARIES
d7f1a100d9 Tests: Split CustomTransitiveProperties argument checks into helper
5ac3cca63d Merge branch 'backport-3.31-custom-transitive-properties' (early part)
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10384
2025-02-24 09:15:47 -05:00
Kitware Robot
a29c2e1cf0 CMake Nightly Date Stamp 2025-02-24 00:07:23 -05:00
Brad King
77c7397ab4 Merge branch 'backport-3.31-custom-transitive-properties' 2025-02-23 08:36:56 -05:00
Brad King
478d6cfd9a Merge branch 'backport-3.30-custom-transitive-properties' 2025-02-23 08:33:12 -05:00
Brad King
8b5af40b34 GenEx: Fix evaluation of LINK_LIBRARIES as custom transitive property
Fix logic from commit b9ee79b8a1 (GenEx: Add support for custom
transitive compile properties, 2024-05-09, v3.30.0-rc1~82^2~1) to more
precisely know when we are computing the link dependency graph.

Issue: #20416
Issue: #26709
2025-02-23 08:30:42 -05:00
Brad King
161f703e76 GenEx: Restore evaluation context for conditional transitive properties
In commit e8010b67c7 (cmGeneratorExpressionDAGChecker: Make local
generator available in constructor, 2024-04-25, v3.30.0-rc1~172^2~6)
we accidentally failed to preserve `EvaluateInterfaceProperty`'s
consistency with `TargetPropertyNode::Evaluate`.  Fix its local
generator selection to match the evaluation context.
2025-02-23 08:30:33 -05:00
Kitware Robot
e185e7d706 CMake Nightly Date Stamp 2025-02-23 00:08:34 -05:00
Brad King
833cdca28b Merge topic 'cmake-gui-test-qt6'
245f5ca8b3 Tests: Make CMakeGUI test build with both Qt5 and Qt6
5afbc739dc ci: Specify Qt version separately for each Fedora build
e35d1ee4cd cmake-gui: Clarify variable name for selected Qt major version
19a1c115e0 cmake-gui: Fix integer conversion warnings with Qt 6
cbf0d3da52 cmake-gui: Port away from deprecated API in Qt >= 6.7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10369
2025-02-22 09:49:25 -05:00
Brad King
5ac3cca63d Merge branch 'backport-3.31-custom-transitive-properties' (early part) 2025-02-22 09:41:13 -05:00
Brad King
2ccbad90e6 cmGeneratorExpressionDAGChecker: Construct with initializer list syntax 2025-02-22 09:11:20 -05:00
Brad King
99fee5720d cmGeneratorExpressionDAGChecker: De-duplicate constructor signature 2025-02-22 08:46:44 -05:00
Brad King
82151ea289 cmGeneratorExpressionDAGChecker: Construct with initializer list syntax 2025-02-22 08:33:20 -05:00
Kitware Robot
96d71dbbbd CMake Nightly Date Stamp 2025-02-22 00:05:50 -05:00
Alexandru Croitor
245f5ca8b3 Tests: Make CMakeGUI test build with both Qt5 and Qt6
Fixes: #26710
2025-02-21 14:41:12 -05:00
Brad King
e35d1ee4cd cmake-gui: Clarify variable name for selected Qt major version 2025-02-21 14:41:12 -05:00
Brad King
19a1c115e0 cmake-gui: Fix integer conversion warnings with Qt 6 2025-02-21 14:41:12 -05:00
Brad King
cbf0d3da52 cmake-gui: Port away from deprecated API in Qt >= 6.7 2025-02-21 12:39:19 -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
1d606df7cc Merge topic 'policy-version-env' into release-4.0
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:12:59 -05:00
Brad King
790954b29d Merge topic 'fix-cps-in-prefix-root'
da0d2a996d CPS: Fix importing from the prefix root

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10375
2025-02-21 09:09:59 -05:00
Kitware Robot
d89c4cd3fb CMake Nightly Date Stamp 2025-02-21 00:06:46 -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
Matthew Woehlke
da0d2a996d CPS: Fix importing from the prefix root
Tweak resolution of CPS prefix path to support the case of the .cps file
being in the prefix root.
2025-02-20 14:49:53 -05:00
Brad King
5585b2521e Merge topic 'compile-commands-posix-paths'
971a8ded06 EXPORT_COMPILE_COMMANDS: Write absolute posix paths to compile_commands.json
ff119423b9 EXPORT_COMPILE_COMMANDS: Append missing newline to compile_commands.json
92fb080ed6 Tests/RunCMake/Swift: Fix CompileCommands expected regex
7d8b39226c cmGlobalNinjaGenerator: Remove obsolete TODO comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !10357
2025-02-20 10:27:24 -05:00
Kitware Robot
ebe181646e CMake Nightly Date Stamp 2025-02-20 00:07:53 -05:00
Brad King
4b5b172a65 CMake 4.0.0-rc1 2025-02-19 09:18:19 -05:00
Kitware Robot
110b217c14 CMake Nightly Date Stamp 2025-02-19 00:06:06 -05:00
ClausKlein
971a8ded06 EXPORT_COMPILE_COMMANDS: Write absolute posix paths to compile_commands.json
Avoid platform-specific path formats in structured fields.
2025-02-18 16:03:15 -05:00
ClausKlein
ff119423b9 EXPORT_COMPILE_COMMANDS: Append missing newline to compile_commands.json 2025-02-18 16:01:24 -05:00
ClausKlein
7d8b39226c cmGlobalNinjaGenerator: Remove obsolete TODO comment 2025-02-18 11:25:14 -05:00
Brad King
d2cda92936 Merge topic 'remove-FindGCCXML'
2123244746 FindGCCXML: Add policy to remove this module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10359
2025-02-18 09:51:32 -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
Kitware Robot
f643ca3c57 CMake Nightly Date Stamp 2025-02-18 00:11:27 -05:00
Brad King
2123244746 FindGCCXML: Add policy to remove this module
GCC-XML has been superseded by CastXML for a long time.

Closes: #26687
2025-02-17 11:35:25 -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
2f4fee232c Merge topic 'version-standalone'
de7648117a CMakeVersion: Make script independently loadable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10356
2025-02-17 10:31:40 -05:00
Brad King
47faea8e15 Merge topic 'version-standalone' into release-4.0
de7648117a CMakeVersion: Make script independently loadable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10356
2025-02-17 10:31:38 -05:00
Kitware Robot
9290a02b68 CMake Nightly Date Stamp 2025-02-17 00:07:43 -05:00
Brad King
ceacabc654 Merge topic 'regex2'
8d455809b0 string: Allow zero-length matches in all REGEX subcommands
ca65fa9a7f string: Allow references to unmatched groups in REGEX REPLACE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10251
2025-02-16 11:12:28 -05:00
Brad King
ad13d2f99a Merge topic 'source-with-and-without-extension'
321c647640 Include source file without an extension after the same name with an extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10271
2025-02-16 11:11:09 -05:00
Brad King
3132d62460 Merge topic 'cps-export-components'
647633e961 Tests: Add CPS end-to-end test
85721c4c56 install(PACKAGE_INFO): Export required components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10339
2025-02-16 11:02:40 -05:00
Brad King
bbbf373fe8 Merge topic 'cps-export-components' into release-4.0
647633e961 Tests: Add CPS end-to-end test
85721c4c56 install(PACKAGE_INFO): Export required components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10339
2025-02-16 11:02:38 -05:00
Brad King
2526b01ffc Merge topic 'instrumentation_cdash'
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
2025-02-16 10:58:12 -05:00
Brad King
4300d08b20 Merge topic 'instrumentation_cdash' into release-4.0
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
2025-02-16 10:58:11 -05:00
Brad King
a36b38502c Merge topic 'rel-sunos'
28f1da4b25 ci: Add jobs to build sunos-{i386,sparc} binaries
59ed18e54d Utilities/Release: Add base images to build sunos-{i386,sparc} binaries
a4e5719d31 Solaris: Rename local variable to avoid conflict with system headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10350
2025-02-16 10:55:40 -05:00
Brad King
de7648117a CMakeVersion: Make script independently loadable 2025-02-16 09:29:17 -05:00
Kitware Robot
3f878572b8 CMake Nightly Date Stamp 2025-02-16 00:09:22 -05:00
Matthew Woehlke
85721c4c56 install(PACKAGE_INFO): Export required components
Modify cmExportPackageInfoGenerator to record not just what packages are
required, but what targets (components) are used by those requirements,
and to populate the requirements' component lists accordingly.
2025-02-15 07:49:13 -05:00
Brad King
c7e6adcb9f Merge topic 'nsis-paths'
d1f00444d1 CPack/NSIS: Avoid UNIX-style paths in macro variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10348
2025-02-15 07:33:21 -05:00
Brad King
a4e5719d31 Solaris: Rename local variable to avoid conflict with system headers 2025-02-15 07:28:06 -05:00
Brad King
7c71d94263 Merge topic 'update-curl'
80ec307900 curl: Set build options the way we need for CMake
ba77812035 Merge branch 'upstream-curl' into update-curl
1865f86e28 curl 2025-02-13 (57495c64)
302d842f6e curl: Update script to get curl 8.12.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10342
2025-02-15 07:27:33 -05:00
Brad King
6597a470c7 Merge topic 'update-curl' into release-4.0
80ec307900 curl: Set build options the way we need for CMake
ba77812035 Merge branch 'upstream-curl' into update-curl
1865f86e28 curl 2025-02-13 (57495c64)
302d842f6e curl: Update script to get curl 8.12.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10342
2025-02-15 07:27:27 -05:00
Zack Galbreath
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
Zack Galbreath
85a63143ed instrument: don't report target=TARGET_NAME
Remove the erroneous default target name when instrumenting
custom commands.
2025-02-15 06:21:58 -05:00
Kitware Robot
822091cc35 CMake Nightly Date Stamp 2025-02-15 00:07:49 -05:00
Nikita Nemkin
8d455809b0 string: Allow zero-length matches in all REGEX subcommands
The semantics mimic other languages like Python, Java, JS, etc.
To advance past a zero-length match, the search algorithm first
tries to find a non-zero alternative branch. If that fails, it
force-advances by 1 character.

Fixes: #13790, #13792, #18690, #26629
2025-02-15 01:01:49 +05:00
Nikita Nemkin
ca65fa9a7f string: Allow references to unmatched groups in REGEX REPLACE
References to unmatched groups will be replaced with empty strings.

Issue: #26629
Fixes: #19012
2025-02-15 01:00:58 +05:00
Evan Wilde
321c647640 Include source file without an extension after the same name with an extension
CMP0115 requires that source files listed in CMake must include their
file extension, but there are cases when projects have different source
files with the same name, but one with an extension and one without.
In the current state, CMake will ignore the file without the extension
an always map it to the file with an extension.

```cmake
add_library(foo bar.c bar)
```

In the above example, the target `foo` will only recognize and depend on
`bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the
source list.
This issue also affects how custom commands emit files.

This change adds a new policy to recognize files with and without a file
extension as different files, both when building targets, and when they
are being created.

Fixes: #26058
2025-02-14 10:01:10 -05:00
Brad King
8845d33292 Merge topic 'regex'
5d039f3be3 regex: Match ^ at most once in repeated searches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10221
2025-02-14 09:38:04 -05:00
Brad King
dce6a7aa61 Merge topic 'policy-version-var'
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10343
2025-02-14 09:32:36 -05:00
Brad King
47689e9253 Merge topic 'policy-version-var' into release-4.0
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10343
2025-02-14 09:32:33 -05:00
Brad King
b9ae6f7154 Merge topic 'fix_autogen_dependencies'
2b314e9009 Autogen: Fix missing autogen dependencies if a target is linked twice

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10344
2025-02-14 09:27:59 -05:00
Brad King
4b41264469 Merge topic 'vs-version'
e5fd973b14 VS: Set the linker image version using the target's VERSION property
2e798a4137 VS: Fix UnityBuild test selection in VS10Project tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10307
2025-02-14 09:18:23 -05:00
Brad King
80ec307900 curl: Set build options the way we need for CMake
Set options added by the update to curl 8.12.1.

In particular, now that upstream curl's CMake code depends on
OpenSSL via imported targets from FindOpenSSL, we can let it
handle the transitive dependency on posix threads.
2025-02-14 08:57:11 -05:00
Nikita Nemkin
d1f00444d1 CPack/NSIS: Avoid UNIX-style paths in macro variables
NSIS macro variables MUI_*_BITMAP require Windows-style paths.
Don't rely on the user and convert them explicitly.

For good measure, also convert the paths for MUI_PAGE_LICENSE,
MUI_ICON and MUI_UNIICON.

Note that NSIS scripts only require quotes for strings with spaces
and ConvertToWindowsOutputPath() handles this automatically.

Fixes: #9945
2025-02-14 18:47:14 +05:00
Kitware Robot
b18513105c CMake Nightly Date Stamp 2025-02-14 00:07:19 -05:00
Alexandru Croitor
2b314e9009 Autogen: Fix missing autogen dependencies if a target is linked twice
Autogen contains code to forward dependencies from an origin target
to its associated <origin>_autogen target. This code also contains a
check to skip forwarding a dependency if it does not appear in the
dependency graph for all configured build types.
This is done by counting the number of times a dependency appears in
the graph for each configured build type.

Unfortunately the code did not account for the case when a dependency
appears more than once in the link graph for a single build type. This
means that for a single-config build, if the same dependency is linked
twice, the dependency will be skipped altogether.

This can lead to build errors in a project where a hypothetical App
target depends on a Lib target, and thus expects App_autogen to depend
on Lib_autogen and any of its dependencies, but the latter is skipped.

Fix this by incrementing the count of a target in the dependency graph
only once per build type.

Fixes: #26700
2025-02-13 14:33:41 -05:00
Brad King
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.

Closes: #26698
2025-02-13 14:00:26 -05:00
Nikita Nemkin
5d039f3be3 regex: Match ^ at most once in repeated searches
When doing successive matches, track the input start and current search
start positions separately to prevent the `^` anchor from matching in
the middle of the string.  Add policy CMP0186 to provide compatibility.

Issue: #26629
Fixes: #16899
2025-02-13 20:00:02 +05:00
Brad King
a0aa37180c Merge topic 'find-cps-version'
3e6466eb16 find_package: Honor version requests when finding CPS packages
7a0e698384 find_package: Fix CPS version parsing
35a7ed125b find_package: Fix reporting of rejected CPS files' version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10297
2025-02-13 09:33:06 -05:00
Brad King
3f2386db2b Merge topic 'find-cps-version' into release-4.0
3e6466eb16 find_package: Honor version requests when finding CPS packages
7a0e698384 find_package: Fix CPS version parsing
35a7ed125b find_package: Fix reporting of rejected CPS files' version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10297
2025-02-13 09:33:04 -05:00
Kitware Robot
2bccf69381 CMake Nightly Date Stamp 2025-02-13 00:06:09 -05:00
Matthew Woehlke
3e6466eb16 find_package: Honor version requests when finding CPS packages
Teach find_package to check a CPS package's version (when provided)
against a version request given to the find_package invocation.
2025-02-12 11:36:41 -05:00
Matthew Woehlke
7a0e698384 find_package: Fix CPS version parsing
Update cmPackageInfoReader's version parsing to more fully conform to
the specification and to reject non-conforming version strings. Start
adding framework to support version schemas other than "simple". Fix how
cmFindPackageCommand extracts version parts to not fail if more than
four parts are present.
2025-02-12 11:35:54 -05:00
Brad King
0492b52fd1 Merge topic 'instrumentation-build-snippet'
c8e319d08c instrumentation: Add experimental notes to docs
f777af7734 instrumentation: Update docs for available snippets
2299b2fcab instrumentation: Add build snippet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10328
2025-02-12 09:43:19 -05:00
Brad King
1d274d34b9 Merge topic 'instrumentation-build-snippet' into release-4.0
c8e319d08c instrumentation: Add experimental notes to docs
f777af7734 instrumentation: Update docs for available snippets
2299b2fcab instrumentation: Add build snippet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10328
2025-02-12 09:43:17 -05:00
Brad King
b96f4e80f2 Merge topic 'cps-fix-config-import'
0ba5343b66 cmPackageInfoReader: Fix configuration-specific importing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10330
2025-02-12 09:33:56 -05:00
Brad King
8e38ea12ec Merge topic 'cps-fix-config-import' into release-4.0
0ba5343b66 cmPackageInfoReader: Fix configuration-specific importing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10330
2025-02-12 09:33:54 -05:00
Brad King
c14c72f0d0 Merge topic 'cps-fix-extra-schema'
83b22da7ac cmPackageInfoReader: Inherit cps_version
caff0d62c6 cmFindPackageCommand: Simplify cmStrCat

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10329
2025-02-12 09:32:38 -05:00
Brad King
4977e98594 Merge topic 'cps-fix-extra-schema' into release-4.0
83b22da7ac cmPackageInfoReader: Inherit cps_version
caff0d62c6 cmFindPackageCommand: Simplify cmStrCat

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10329
2025-02-12 09:32:37 -05:00
Brad King
aad342d75a Merge topic 'update-kwsys'
9afe813781 Merge branch 'upstream-KWSys' into update-kwsys
7cd4048b3a KWSys 2025-02-12 (49c09912)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10327
2025-02-12 09:27:39 -05:00
Brad King
6571bf0be5 Merge topic 'update-kwsys' into release-4.0
9afe813781 Merge branch 'upstream-KWSys' into update-kwsys
7cd4048b3a KWSys 2025-02-12 (49c09912)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10327
2025-02-12 09:27:37 -05:00
Brad King
6bd903551e Merge topic 'findbase_dont_erase_outofbounds_entry'
f5837f0ac9 cmFindBase: Don't pass vector::erase an out of bounds iterator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10331
2025-02-12 09:23:39 -05:00
Brad King
e14b86b7ff Merge topic 'findbase_dont_erase_outofbounds_entry' into release-4.0
f5837f0ac9 cmFindBase: Don't pass vector::erase an out of bounds iterator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10331
2025-02-12 09:23:37 -05:00
Brad King
584bf096fa Merge topic 'execute_process-cmd-bat'
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
2025-02-12 09:10:04 -05:00
Brad King
7e5a80c7ff Merge topic 'execute_process-cmd-bat' into release-4.0
b902fbd0c6 execute_process: Clarify when a Windows command interpreter is used
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nikita Nemkin <nikita@nemkin.ru>
Acked-by: Alexey Edelev <alexey.edelev@qt.io>
Merge-request: !10321
2025-02-12 09:10:03 -05:00
Brad King
9afe813781 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-02-12 (49c09912)
2025-02-12 07:24:00 -05:00
Kitware Robot
2adf14f420 CMake Nightly Date Stamp 2025-02-12 00:06:03 -05:00
Robert Maynard
f5837f0ac9 cmFindBase: Don't pass vector::erase an out of bounds iterator
Fixes: #26606
2025-02-11 14:59:21 -05:00
Martin Duffy
2299b2fcab instrumentation: Add build snippet
Adds a new snippet generation for recording the full time spent waiting for
`ninja` or `make` invocations to finish.
2025-02-11 13:31:28 -05:00
Matthew Woehlke
0ba5343b66 cmPackageInfoReader: Fix configuration-specific importing
Modify cmPackageInfoReader to also append the configuration to the
IMPORTED_CONFIGURATIONS property of every target which has configuration
specific properties. We retain pre-populating this with the package's
default_configurations (if specified) in order to ensure that those are
given preference, but we also need to add every configuration that
actually exists in order to ensure that the target is usable, especially
if default_configurations was not provided.
2025-02-11 13:23:29 -05:00
Matthew Woehlke
83b22da7ac cmPackageInfoReader: Inherit cps_version
Modify cmPackageInfoReader to not require schema_version in supplemental
files (i.e. appendices and/or configuration-specific files). This is
important as our own generation is not including cps_version in
supplemental files, and it is forbidden in the same according to a
strict reading of the specification.
2025-02-11 12:32:46 -05:00
Matthew Woehlke
caff0d62c6 cmFindPackageCommand: Simplify cmStrCat
Replace an unnecessary single-character string_view in cmStrCat with a
literal character.
2025-02-11 12:29:06 -05:00
Brad King
2cd962c2c4 Merge topic 'instrumentation-doc-fixes'
32e9d27c88 instrumentation: Remove undocumented binaryDir field from snippets
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10320
2025-02-11 07:46:48 -05:00
Brad King
b2674f3b38 Merge topic 'instrumentation-doc-fixes' into release-4.0
32e9d27c88 instrumentation: Remove undocumented binaryDir field from snippets
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10320
2025-02-11 07:46:46 -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
2f1dfef868 Merge topic 'update-kwsys'
0938643895 Merge branch 'upstream-KWSys' into update-kwsys
c4206da3f7 KWSys 2025-02-10 (2e2f80f1)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10317
2025-02-11 07:43:52 -05:00
Nikita Nemkin
e5fd973b14 VS: Set the linker image version using the target's VERSION property
This matches the behavior of NMake, Ninja and older Visual Studio
generators.

Fixes: #13130
2025-02-11 17:36:34 +05:00
Kitware Robot
7dc37fb326 CMake Nightly Date Stamp 2025-02-11 00:08:22 -05:00
Brad King
e388ed687a execute_process: Improve invocation of .cmd/.bat with spaces
Extend the fix from commit 74c9d40876 (execute_process: Fix invocation
of .cmd/.bat with spaces, 2025-01-31) to work without relying on
conversion to a "short path", which may not exist.  Instead, extending
the `cmd /c` wrapper to `cmd /c call` seems to support spaces directly.

Suggested-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fixes: #26655
2025-02-10 19:44:19 -05:00