Commit Graph

67671 Commits

Author SHA1 Message Date
Brad King
569b821a13 CMake 3.31.4 2025-01-10 09:59:02 -05:00
Brad King
92b260387d Merge topic 'duplicate-source-behavior' into release-3.31
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10155
2025-01-10 09:28:14 -05:00
Brad King
3df8890638 Merge topic 'lfortran-generate-object-code' into release-3.31
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10159
2025-01-10 09:26:54 -05:00
Brad King
8f45140baf Merge topic 'revert-genex-tco-subgraph' into release-3.31
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10156
2025-01-10 09:21:01 -05:00
Ben Boeckel
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
In commit 9c0491a3e4 (cmDyndepCollation: write out scanned source
information too, 2024-03-25) via !9708, the `sf_map` gained a new job of
also being used to track non-file set sources which could import
modules. This was implemented by removing processed `FILE_SET TYPE
CXX_MODULES` sources from the map and working with the sources
remaining. When a `FILE_SET TYPE CXX_MODULES` source appeared multiple
times, this would then erroneously complain that it "was not scheduled
for compilation". Use a set of source paths to track sources that have
already been processed. If duplicates are found, trigger an author
warning and skip the duplicate file.

Fixes: #26549
2025-01-09 22:36:06 +01:00
Ben Boeckel
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources
See: #26549
2025-01-09 22:36:06 +01:00
Saurabh Kumar
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag
This was added in commit 98d0f918ba (LFortran: Add support for this
compiler, 2024-01-25, v3.31.0-rc1~303^2~2) because it is needed for
cases covered by CMake's Fortran tests.  However, it does not work
with Fortran modules and breaks lfortran's own `examples/project1`.
Move the flag to the test cases that need it, just as the original
commit did with `--implicit-interface`.

Fixes: #26597
Co-authored-by: Brad King <brad.king@kitware.com>
2025-01-09 14:49:39 -05:00
Brad King
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"
Revert commit 4a11772618 (GenEx: Limit TARGET_PROPERTY transitive
closure optimization to subgraphs, 2024-05-31, v3.31.0-rc1~114^2).
The change caused substantial performance regressions in some
existing use cases.  Revert it pending further investigation.

Issue: #25728
Fixes: #26457
2025-01-09 11:56:20 -05:00
Brad King
627d710570 Merge topic 'FindBoost-1.87' into release-3.31
f485f94d1a FindBoost: Add support for Boost 1.87

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10147
2025-01-08 09:25:07 -05:00
Brad King
d29855f985 Merge topic 'codegen-help' into release-3.31
45726d93a8 Makefile: List codegen target in help

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10146
2025-01-08 09:23:59 -05:00
Brad King
f485f94d1a FindBoost: Add support for Boost 1.87
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_87_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.87.0 source tree.

Dependencies differ from 1.86:

* Boost.Log no longer depends on Boost.Chrono

Fixes: #26562
2025-01-07 15:41:31 -05:00
Brad King
45726d93a8 Makefile: List codegen target in help
This was left out of commit 197cb419d1 (add_custom_command: Add
CODEGEN support, 2024-05-27, v3.31.0-rc1~394^2).

Fixes: #26545
2025-01-07 15:14:53 -05:00
Marc Chevrier
e7153c29ac Merge topic 'Help-FindPython-Fix-typo' into release-3.31
e7ea2998fb Help: FindPython: fix typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10121
2024-12-22 07:17:52 -05:00
Marc Chevrier
e7ea2998fb Help: FindPython: fix typo 2024-12-21 17:50:25 +01:00
Brad King
41abd532b6 CMake 3.31.3 2024-12-19 10:18:19 -05:00
Brad King
01bfaf6b92 Merge topic 'ci-xcode-16.2' into release-3.31
86ee7cb4fe ci: update macOS jobs to use Xcode 16.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10107
2024-12-18 08:40:21 -05:00
Brad King
86ee7cb4fe ci: update macOS jobs to use Xcode 16.2 2024-12-17 10:57:22 -05:00
Brad King
51457c10b3 Merge branch 'release-3.30' into release-3.31 2024-12-17 10:55:32 -05:00
Brad King
f27ba9768b Merge topic 'ctest-invalid-arg' into release-3.31
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:54:53 -05:00
Brad King
ba86b3d841 Merge topic 'ctest-invalid-arg' into release-3.30
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10106
2024-12-17 10:35:26 -05:00
Brad King
30dded462a Help: Add 3.30 release note for error on unknown arguments to ctest
This was left out of commit 304396d13c (ctest: Show error on invalid
ctest arguments, 2024-04-03, v3.30.0-rc1~286^2).

Fixes: #26539
2024-12-17 10:32:05 -05:00
Brad King
abeabd7c0c Merge topic 'ci-linkcheck' into release-3.31
25b25a7724 Help: Update link to UTF-8 RFC 3629

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10103
2024-12-17 10:07:46 -05:00
Brad King
25b25a7724 Help: Update link to UTF-8 RFC 3629
The old link now returns 404.
2024-12-16 09:20:23 -05:00
Brad King
ab3f1a2782 Merge branch 'release-3.30' into release-3.31 2024-12-12 09:14:36 -05:00
Brad King
e80d42cf6b Merge topic 'iface-public-modules' into release-3.30
854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries
cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10090
2024-12-12 09:12:25 -05:00
Brad King
2670dd4ed1 Merge topic 'iface-public-modules' into release-3.31
854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries
cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10090
2024-12-12 09:11:59 -05:00
Brad King
6622ae651f Merge topic 'install-DESTINATION-regression' into release-3.31
92e63421cb install: Restore treatment of DESTINATION as a single-valued keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10088
2024-12-12 09:01:18 -05:00
Brad King
854eba0c53 target_sources: Improve error message for CXX_MODULES on INTERFACE libraries
We support non-compiled `SOURCES` on `INTERFACE` libraries, and also
support `CXX_MODULES` on *imported* `INTERFACE` libraries (via synthetic
targets that compile module interface units).  However, we do not
support `CXX_MODULES` on non-imported `INTERFACE` libraries because
there is no place to hold module interface unit's object files for their
module initializers.  Previously this was not explicitly rejected, and
so was diagnosed only by "CMake Internal Error" messages due to
assumption violations in the implementation.

Fixes: #26524
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
2024-12-11 12:34:29 -05:00
Brad King
cd179e7560 Tests/RunCMake/CXXModules: Rename FileSetModules cases to be more specific
They all add `CXX_MODULES` to `STATIC` libraries.
2024-12-11 12:20:45 -05:00
Brad King
4671919cbb Merge topic 'codegen-make' into release-3.31
25b43a5b7f Makefile: Enable progress messages for codegen target
af2b340a2e Makefile: Fix per-directory codegen target
b7e6c418e3 cmLocalUnixMakefileGenerator3: Simplify progress command generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10085
2024-12-11 10:10:02 -05:00
Craig Scott
92e63421cb install: Restore treatment of DESTINATION as a single-valued keyword
The `install(RUNTIME_DEPENDENCY_SET)` form processes its arguments in a
slightly different way to other forms of the command. It handles the
`POST_...`, `PRE_...` and `DIRECTORIES` keywords separately. These
keywords are not visible to the first layer of keyword processing, so
they don't terminate multi-value keyword value parsing.

Before commit 6a1fac1450 (install: Normalize DESTINATION paths,
2024-09-18, v3.31.0-rc1~73^2), the `DESTINATION` keyword was handled as
a simple string value. That commit changed it to use a function so it
could process the value before storing it, but the function returned the
wrong value. This meant it was treated as a multi-value keyword instead
of a single-value keyword.

Fixes: #26512
2024-12-11 09:58:39 -05:00
Brad King
f5c5b39ce8 Merge topic 'codegen-ninja' into release-3.31
5ce1ca607f Ninja: Add missing top-level codegen dependencies on per-directory codegen
5d0f2aba7e cmGlobalNinjaGenerator: Simplify per-directory configuration list lookup
505ffdcbde cmGlobalNinjaGenerator: Clarify order of codegen build statement logic
5f33736c03 cmGlobalNinjaGenerator: Fix local variable name for codegen target
e308d1bb88 cmGlobalNinjaGenerator: Remove unnecessary local variable
c08543d711 cmGlobalNinjaGenerator: Remove unused local variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10084
2024-12-11 09:42:07 -05:00
Brad King
5ce1ca607f Ninja: Add missing top-level codegen dependencies on per-directory codegen
In commit 197cb419d1 (add_custom_command: Add CODEGEN support,
2024-05-27, v3.31.0-rc1~394^2) we accidentally left out the global
`codegen` target's dependencies on the per-directory `codegen` targets.
Add them for parity with the `all` target.

Fixes: #26517
2024-12-10 11:46:31 -05:00
Brad King
5d0f2aba7e cmGlobalNinjaGenerator: Simplify per-directory configuration list lookup 2024-12-10 11:41:27 -05:00
Brad King
505ffdcbde cmGlobalNinjaGenerator: Clarify order of codegen build statement logic
Make it more consistent with the equivalent logic for "all".
2024-12-10 11:41:27 -05:00
Brad King
5f33736c03 cmGlobalNinjaGenerator: Fix local variable name for codegen target 2024-12-10 11:41:26 -05:00
Brad King
e308d1bb88 cmGlobalNinjaGenerator: Remove unnecessary local variable 2024-12-10 11:41:26 -05:00
Brad King
c08543d711 cmGlobalNinjaGenerator: Remove unused local variable 2024-12-10 11:41:26 -05:00
Brad King
25b43a5b7f Makefile: Enable progress messages for codegen target
This was left out of commit 197cb419d1 (add_custom_command: Add CODEGEN
support, 2024-05-27, v3.31.0-rc1~394^2).
2024-12-10 11:36:29 -05:00
Brad King
af2b340a2e Makefile: Fix per-directory codegen target
Issue: #26517
2024-12-10 11:36:29 -05:00
Brad King
b7e6c418e3 cmLocalUnixMakefileGenerator3: Simplify progress command generation 2024-12-10 11:36:29 -05:00
Brad King
c5ad3f9792 Merge topic 'vs-clang-cl-c++23' into release-3.31
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
57da8712c1 VS: Factor out check for mixed C and C++ target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10082
2024-12-10 09:12:02 -05:00
Brad King
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13,
v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since
`clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an
even newer version of C++.  However, in `.vcxproj` files there is no way
to express a target-wide `-clang:-std=c++23` flag for only C++ sources
when the target also has C sources.  Add a special case to map back to
`-std:c++latest` for targets with C++23 and C together.

Fixes: #26508
2024-12-09 14:57:35 -05:00
Brad King
57da8712c1 VS: Factor out check for mixed C and C++ target 2024-12-09 14:19:51 -05:00
Brad King
793c5f11f6 CMake 3.31.2 2024-12-05 08:42:47 -05:00
Brad King
4d4d7b793d Merge topic 'autogen-revert-ui-rebuild' into release-3.31
debc4d3906 Autogen: Revert adding ui files to byproducts of the timestamp target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10056
2024-12-05 08:10:35 -05:00
Brad King
eca2e2650a Merge topic 'linker-prefix-crash' into release-3.31
76f4fc7dd0 LINK_OPTIONS: Fix crash on empty LINKER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10066
2024-12-05 08:09:25 -05:00
Brad King
8a1bc43662 Merge topic 'ci-fedora-41' into release-3.31
ec682ff22a ci: Update to ROCm 6 HIP on Fedora 41

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10069
2024-12-05 08:07:54 -05:00
Brad King
ec682ff22a ci: Update to ROCm 6 HIP on Fedora 41
The problem that motivated commit 3a44b8dfc0 (ci: Move job for HIP tests
on Fedora 39 to a dedicated base image, 2024-04-24, v3.30.0-rc1~202^2~11)
turns out to be exposed by spaces in the path to HIP binaries.  Move the
CI work directory to a path without spaces.

Closes: #25932
2024-12-04 12:35:01 -05:00
Brad King
76f4fc7dd0 LINK_OPTIONS: Fix crash on empty LINKER: prefix
Since commit e3895f4a8b (Linking: Preserve nested LINKER: prefixes as
written, 2024-09-17, v3.31.0-rc1~60^2) we may increment an iterator past
the end.  Revise logic to avoid that.

Fixes: #26499
2024-12-04 10:16:56 -05:00