Commit Graph

36303 Commits

Author SHA1 Message Date
Brad King
1b0c92a3a1 cmCurl: Avoid using undocumented type for CURLOPT_NETRC values
Since upstream curl commit `2ec00372a1` (curl.h: change some enums to
defines with L suffix, 2025-02-25), the `CURL_NETRC_*` constants are
integer literals instead of `enum CURL_NETRC_OPTION`.  It turns out
that `curl_easy_setopt` has always expected a `long` anyway, and
that `CURL_NETRC_OPTION` is not documented for public use.

Fixes: #26754
2025-03-10 11:17:19 -04:00
Brad King
f68bd58c9f Merge topic 'cmake-gui-incidental-errors' into release-3.31
e9c494005c cmake-gui: Fix regression that prints an incidental error on fresh build trees

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10429
2025-03-07 12:14:00 -05:00
Juan Ramos
e9c494005c cmake-gui: Fix regression that prints an incidental error on fresh build trees
Since commit a872844908 (cmake-gui: Handle relative paths in the build
directory text input, 2024-04-24, v3.30.0-rc1~5^2), `cmake-gui` gave an
incidental error message even when a valid build directory was being
passed.  Fix this by checking for a non-empty path before using it.

Fixes: #26744
2025-03-06 11:13:06 -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
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
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
Brad King
9fe70fd764 CMake 3.31.5 2025-01-23 10:53:36 -05:00
Brad King
d437178a10 CMake 3.30.7 2025-01-23 09:59:38 -05:00
Brad King
b4b8287b1d Merge topic 'AutoExport-vftable' into release-3.31
41ff2916f2 WINDOWS_EXPORT_ALL_SYMBOLS: Fix vftable symbol export on ARM64EC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Shijun zhang <1018423405@qq.com>
Merge-request: !10187
2025-01-20 14:13:12 -05:00
Brad King
41ff2916f2 WINDOWS_EXPORT_ALL_SYMBOLS: Fix vftable symbol export on ARM64EC
Extend commit f513781bc5 (WINDOWS_EXPORT_ALL_SYMBOLS: Export vftable
symbol, 2023-02-13, v3.27.0-rc1~495^2) to classify the symbol as data
on ARM64EC.

Fixes: #26604
2025-01-17 08:46:15 -05:00
Martin Duffy
ca5e6dadb5 install: Generate InstallScripts.json in consistent location
Since commit 159ba027b9 (Install: Add parallel installation option,
2024-06-19, v3.31.0-rc1~333^2) the file was generated relative to the
current working directory.  This is not always the top of the build
tree, so specify the path explicitly.
2025-01-13 12:04:42 -05:00
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
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
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
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
Brad King
41abd532b6 CMake 3.31.3 2024-12-19 10:18:19 -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
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
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
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
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
Orkun Tokdemir
debc4d3906 Autogen: Revert adding ui files to byproducts of the timestamp target
When `ui_` include directives have different paths than `CMakeLists.txt`,
the dependency graph is not generated correctly.  This is the root cause
of #16776.  However, when #26135 was fixed by commit 5363bebc1e (Autogen:
Fix compilation of unchanged source files, 2024-07-16, v3.31.0-rc1~328^2),
it made #16776 worse: the build is always dirty.  Revert the fix for now.

Fixes: #26485
Issue: #26135
Issue: #25436
2024-12-04 12:37:13 +01:00
Brad King
1a04515a47 fileapi: Do not expose flags for linker-generated dependencies
In commit 375e6fdbbe (Link step: use linker dependency linker file,
2023-04-19, v3.27.0-rc1~126^2) we added the `-Wl,--dependency-file,...`
flag for the Ninja generator in a code path shared with the file-api.
This flag is a build system implementation detail and should not be
exposed to file-api clients.  Move it to a Ninja-specific code path.

Fixes: #26498
2024-12-03 13:48:57 -05:00
Orkun Tokdemir
8a526f6a44 Autogen: Fix Ninja Multi-Config dependency graph regression
In commit 5363bebc1e (Autogen: Fix compilation of unchanged source files,
2024-07-16, v3.31.0-rc1~328^2) we relied on Ninja Multi-Config dependency graph
optimizations from commit 7c39dabdbc (Autogen: AUTO*_EXECUTABLE: add support
for per-config values, 2023-10-18, v3.29.0-rc1~105^2~1).  However, those graph
optimizations are conditional on versions of Qt that enable
[`AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`](https://codereview.qt-project.org/c/qt/qtbase/+/513648).

`UseBetterGraph` should be checked to add ui files to `timestampByproducts`.

Fixes: #26475
2024-11-28 09:13:56 -05:00
Orkun Tokdemir
3cac48e8cd Autogen: Restore <target_name>_autogen_timestamp_deps target
Revert commit 91b2ce4a69 (Autogen: Remove ..._autogen_timestamp_deps
target, 2024-06-27, v3.31.0-rc1~391^2).  The `_autogen_timestamp_deps`
target is needed for pre-`AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` behavior.

Issue: #26080
Issue: #26475
2024-11-28 09:13:46 -05:00
Brad King
2fad42832d Merge topic 'aix-archive-shared-libraries-export' into release-3.31
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10027
2024-11-23 15:12:49 -05:00
Brad King
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports
Teach `export()` and `install(EXPORT)` to record this setting on the
imported targets they generate.  Make this property's non-presence
authoritative on imported targets since they represent what was built
elsewhere.
2024-11-21 19:02:00 -05:00
Brad King
f923463f2b AIX: Disallow TARGET_SONAME_* genex for AIX_SHARED_LIBRARY_ARCHIVE targets
AIX shared library archives have no filesystem artifact named with their
SONAME because it is in an archive.
2024-11-21 18:44:25 -05:00
Brad King
eb281d3454 CMake 3.31.1 2024-11-21 11:15:52 -05:00