Commit Graph

32157 Commits

Author SHA1 Message Date
Brad King
8ef1fffa45 Merge topic 'ninja_compile_database_understand_new_cuda_lang_variables'
f7c6b9833c CUDA: Ninja generator generates valid compile database

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7129
2022-03-31 08:47:25 -04:00
Kitware Robot
6f132d6c91 CMake Nightly Date Stamp 2022-03-31 00:01:20 -04:00
Robert Maynard
f7c6b9833c CUDA: Ninja generator generates valid compile database
The ninja generator has been updated to poperly write the compile
database when the CUDA language has been enabled.

Fixes #23368
2022-03-30 15:16:43 -04:00
Brad King
a7b325e203 Merge topic 'verify-header-sets'
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7085
2022-03-30 09:10:25 -04:00
Brad King
70ee9a313a Merge topic 'framework-consumption-during-compilation'
45ac71d8bc Ensure targets which are frameworks can be used freely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !7121
2022-03-30 09:02:15 -04:00
Kitware Robot
c65bcea078 CMake Nightly Date Stamp 2022-03-30 00:01:17 -04:00
Kyle Edwards
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property
Fixes: #23338
2022-03-29 13:58:27 -04:00
Brad King
00677703d0 CMake 3.23.0 2022-03-29 11:02:43 -04:00
Brad King
1ccaaaf203 Merge topic 'set-env-var-first-run'
05e510bf0b CMP0132: Don't set compiler environment variables on first run
774a9eb210 Tests: Reorder CMP0129 test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7108
2022-03-29 10:41:56 -04:00
Craig Scott
05e510bf0b CMP0132: Don't set compiler environment variables on first run
When running CMake for the first time in a build tree, for some
generators CMake would set compiler environment variables
like CC, CXX, etc. when the corresponding language is enabled.
That behavior was never documented and can result in different
behavior between the first and subsequent runs. Add a policy
to no longer set those environment variables.

Fixes: #21378
2022-03-29 09:42:59 -04:00
Brad King
ce4acba7fb Merge topic 'fix-23191'
fd46db1745 Trace: process else and elseif commands correctly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7118
2022-03-29 09:39:56 -04:00
Marc Chevrier
45ac71d8bc Ensure targets which are frameworks can be used freely
Ensure flag -F/path/to/framework is specified during compilation step
of consumers of the framework.

Fixes: #23336
2022-03-29 13:57:11 +02:00
Kitware Robot
2a88b807ce CMake Nightly Date Stamp 2022-03-29 00:01:23 -04:00
Brad King
e3f2601a9d Merge topic 'variable-link-feature-supported'
1777883f8b genex-LINK_(LIBRARY|GROUP) features: update variables behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7113
2022-03-28 11:03:36 -04:00
Brad King
9f1cbddad6 Merge topic 'cpack-ifw-validate-input'
e41f1ef6ff CPack/IFW: Add missing referenced source file validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Merge-request: !7116
2022-03-28 10:53:14 -04:00
Brad King
7f1573ea77 Merge topic 'cpack-ifw-validate-input' into release-3.23
e41f1ef6ff CPack/IFW: Add missing referenced source file validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Merge-request: !7116
2022-03-28 10:53:13 -04:00
Brad King
bb58a4d7e4 Merge topic 'bindexplib-arm64ec'
b019ee1a8d bindexplib: Exclude entry and exit thunks for arm64EC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7112
2022-03-28 10:49:54 -04:00
Brad King
710c7ab647 Merge topic 'bindexplib-arm64ec' into release-3.23
b019ee1a8d bindexplib: Exclude entry and exit thunks for arm64EC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7112
2022-03-28 10:49:53 -04:00
Brad King
db853ac228 Merge topic 'aix-exe-exports'
a8dae21ac1 AIX: Fix executable ENABLE_EXPORTS in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7120
2022-03-28 10:47:46 -04:00
Brad King
a0149b08f0 Merge topic 'aix-exe-exports' into release-3.23
a8dae21ac1 AIX: Fix executable ENABLE_EXPORTS in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7120
2022-03-28 10:47:45 -04:00
Kitware Robot
75ac22356a CMake Nightly Date Stamp 2022-03-28 00:01:21 -04:00
Kitware Robot
b8d579b4fa CMake Nightly Date Stamp 2022-03-27 00:01:09 -04:00
Brad King
a8dae21ac1 AIX: Fix executable ENABLE_EXPORTS in Makefile generators
In commit afcd9fe669 (AIX: Add an option to disable automatic exports
from shared libraries, 2020-01-30, v3.17.0-rc1~47^2) the population of
the `<AIX_EXPORTS>` rule variable placeholder was accidentally added to
the device linking rule rather than the main linking rule.  This caused
our `ExportImportList` script on AIX, when called for executables with
`ENABLE_EXPORTS` set, to be given an `AIX_EXPORTS` file name that does
not exist, leading to a warning from the `dump` tool.

Move the population of the `<AIX_EXPORTS>` placeholder in the Makefile
generators to the main link rule.

Issue: #20290
2022-03-26 08:28:59 -04:00
Kitware Robot
843d1d198d CMake Nightly Date Stamp 2022-03-26 00:01:25 -04:00
Braulio Valdivielso Martinez
fd46db1745 Trace: process else and elseif commands correctly
There have been two bugs reported about the `else` and `elseif`
commands in the context of the tracing functionality and the json-v1
format (#23191 #22315). In essence, the reported traces referred to
the layer of the stacktrace immediately on top of the expected ones.

This MR fixes both issues. My solution adds a new parameter to the
`PrintCommandTrace` function, `commandMissingFromStack`, that callers
can specify if the command they want to report a trace for is not a
regular part of the stack maintained in `cmMakefile`. This is only the
case for `else` and `elseif`. The other bug is fixed by having the
caller pass a `cmListFileBacktrace`, which helps in getting the right
lines, file names... for the reported command.

Fixes: #23191 #22315
2022-03-25 12:24:38 -04:00
moyo1997
b019ee1a8d bindexplib: Exclude entry and exit thunks for arm64EC 2022-03-25 11:00:21 -04:00
Brad King
25b9fb0b1a Merge topic 'link-interface-direct'
cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex
41a6b4a53b INTERFACE_LINK_LIBRARIES_DIRECT: Honor link dependencies through LINK_ONLY
73337cb383 LINK_LIBRARIES: Evaluate separately for linking and usage requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7107
2022-03-25 09:12:39 -04:00
Brad King
96420a4afd Merge topic 'cmake-fresh'
9f1471739d cmake: Add --fresh option to clear the cache and start from scratch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7099
2022-03-25 09:09:56 -04:00
Brad King
b11d789ef7 Merge topic 'cmake-E-tar-touch'
0b7fd783f8 cmake -E tar: Add --touch option
f692cba34b Tests: Add test for 'cmake -E tar --mtime' option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7061
2022-03-25 09:05:41 -04:00
Craig Scott
e41f1ef6ff CPack/IFW: Add missing referenced source file validation 2022-03-25 22:53:19 +11:00
Marc Chevrier
1777883f8b genex-LINK_(LIBRARY|GROUP) features: update variables behavior
Variable CMAKE_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is evaluated
only if CMAKE_<LANG>_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is not defined.

This new behavior enable to activate a feature globally on a platform and to disable
it for some compilers and languages.
2022-03-25 12:29:28 +01:00
Kitware Robot
2328843450 CMake Nightly Date Stamp 2022-03-25 00:01:08 -04:00
Brad King
cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex
Previously we always used content guarded by `$<LINK_ONLY:...>`
in `LINK_LIBRARIES`, even when evaluating for non-linking usage
requirements.  Add a policy to honor `LINK_ONLY` in `LINK_LIBRARIES`
the same way we already do in `INTERFACE_LINK_LIBRARIES`.
2022-03-24 08:23:55 -04:00
Kitware Robot
289ac21a46 CMake Nightly Date Stamp 2022-03-24 00:01:24 -04:00
Brad King
18b02cc127 CMake 3.23.0-rc5 2022-03-23 10:11:55 -04:00
Kasper Laudrup
0b7fd783f8 cmake -E tar: Add --touch option
Similar to GNU tar add a --touch option to the tar extract command to
skip extracting the timestamps from the files in the archive
effectively touching them as if they were just created.

Issue: #22746
2022-03-23 14:41:34 +01:00
Brad King
00563063c0 Merge topic 'initialize-property-name'
26caa97057 define_property(): Change constraints of INITIALIZE_FROM_VARIABLE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7103
2022-03-23 09:32:11 -04:00
Kyle Edwards
26caa97057 define_property(): Change constraints of INITIALIZE_FROM_VARIABLE
Remove the requirement that the variable name have a prefix while
keeping the suffix requirement. Require that the property name
contains an underscore. Update docs and tests accordingly.

Fixes: #23340
2022-03-23 16:39:32 +11:00
Kitware Robot
7936fc65dc CMake Nightly Date Stamp 2022-03-23 00:01:46 -04:00
Brad King
41a6b4a53b INTERFACE_LINK_LIBRARIES_DIRECT: Honor link dependencies through LINK_ONLY
In commit f3ad061858 (Add usage requirements to update direct link
dependencies, 2022-01-12, v3.23.0-rc1~44^2), we evaluated the transitive
closure of `INTERFACE_LINK_LIBRARIES` as a non-linking usage requirement.
That left out `INTERFACE_LINK_LIBRARIES_DIRECT` link dependencies that
appear behind private dependencies of a static library, guarded by the
`$<LINK_ONLY:...>` generator expression.  At the time, that decision was
intentional, in order to prevent arbitrary usage requirements from
leaking out of `PRIVATE` dependencies.

Since then, we've revised evaluation of `LINK_LIBRARIES` to distinguish
between collecting link dependencies and other usage requirements.  Use
that information when following `INTERFACE_LINK_LIBRARIES` to collect
the matching kind of requirements from `INTERFACE_LINK_LIBRARIES_DIRECT`.

Fixes: #22496
2022-03-22 11:57:48 -04:00
Brad King
73337cb383 LINK_LIBRARIES: Evaluate separately for linking and usage requirements
We evaluate `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` for two purposes:

* Constructing the link line.
* Collecting usage requirements.

We evaluate `INTERFACE_LINK_LIBRARIES` separately for each purpose in
order to support the `$<LINK_ONLY:...>` generator expression used to
express private link dependencies of a static library.  Previously we
only evaluated `LINK_LIBRARIES` for linking, and used that result for
collecting usage requirements too.  Therefore `$<LINK_ONLY:...>` does
not work in `LINK_LIBRARIES`.

With the introduction of `INTERFACE_LINK_LIBRARIES_DIRECT`, evaluation
of `LINK_LIBRARIES` now needs to distinguish these two cases in order to
honor link dependencies encountered through `$<LINK_ONLY:...>` without
also exposing other usage requirements through private dependencies of a
static library.  Revise internal infrastructure to distinguish the two
cases when evaluating `LINK_LIBRARIES`.  Make the information available
in code paths for `INTERFACE_LINK_LIBRARIES_DIRECT` and `LINK_ONLY`.
Defer actually using the information to later commits.

Issue: #22496
2022-03-22 11:57:48 -04:00
Brad King
2aad4cef97 Merge topic 'revert-link-interface-direct-for-3.23' into release-3.23
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7098
2022-03-22 11:56:43 -04:00
Brad King
9f1471739d cmake: Add --fresh option to clear the cache and start from scratch
Simplify the workflow to re-run CMake from scratch as if a build tree
were never before processed, regardless of whether it has been.

Fixes: #23119
2022-03-22 09:27:47 -04:00
Brad King
bbfc6215aa Merge topic 'cleanup-define_property'
87c3b5e421 define_property(): Only test prefix if INITIALIZE_FROM_VARIABLE is given
9b50f221f6 Help: Update the main purpose of define_property()
e993e2c52c Help: Clean up INITIALIZE_FROM_VARIABLE define_property() option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7090
2022-03-22 08:55:15 -04:00
Brad King
2f3cf60711 Merge topic 'cleanup-define_property' into release-3.23
87c3b5e421 define_property(): Only test prefix if INITIALIZE_FROM_VARIABLE is given
9b50f221f6 Help: Update the main purpose of define_property()
e993e2c52c Help: Clean up INITIALIZE_FROM_VARIABLE define_property() option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7090
2022-03-22 08:55:14 -04:00
Brad King
a20424e737 Merge topic 'productbuild-rootVolumeOnly'
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7092
2022-03-22 08:51:02 -04:00
Kitware Robot
e4039a8e34 CMake Nightly Date Stamp 2022-03-22 00:01:18 -04:00
Brad King
7e642a6fa0 Merge topic 'ghs_predefined_targets'
399e73b89a GHS: release note
829e946c69 GHS: Update tests for updated binary layout
93c1acd8ff GHS: List predefined targets before user targets in GUI
bdb213819c GHS: Do not include WindowsPaths
b3e9c72901 GHS: use INSTALL target
a645287784 GHS: update build command
724b5491ef GHS: Rearrange project files in binary directory
edff0f6a1d GHS: Use Custom Target for ALL_BUILD
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7079
2022-03-21 14:36:42 -04:00
Brad King
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch
Revert commit f3ad061858 (Add usage requirements to update direct link
dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage
updates in its predecessor commit 193a999cd5 (cmTarget: Add
INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage,
2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch.

After initial experience using the feature in practice, additional
design considerations have been raised for discussion in the original
issue.  To avoid rushing this for the 3.23 series, we've decided to
revert the feature for now so it can be revised for a future release.

Issue: #22496
2022-03-21 13:17:32 -04:00
Craig Scott
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
The rootVolumeOnly attribute is deprecated. Apple docs say to use
domains instead.

Fixes: #23343
2022-03-21 15:43:46 +11:00