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
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
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: #25728Fixes: #26457
Implements the generator expression $<PATH:MATIVE_PATH> which convert
path(s) into a native format with platform-specific slashes (``\`` on
Windows hosts and ``/`` elsewhere).
Fixes: #26515
Teach the `$<TARGET_PROPERTY:...>` generator expression to check for a
new `TRANSITIVE_COMPILE_PROPERTIES` property in the target's link
closure to enable transitive evaluation of named properties through
the link closure, excluding entries guarded by `$<LINK_ONLY:...>`.
Issue: #20416
Since commit 1e49880472 (cmGeneratorTarget: Avoid boolean trap in usage
requirement lookup, 2021-12-08, v3.23.0-rc1~245^2) we have clarified
the distinction between compile-only and link-only usage requirements.
Rename the `LinkInterfaceFor` enum to `UseTo` to clarify that its role
is to specify the purpose of usage requirements.
Since commit 895efd4e7a (cmGeneratorExpression: Consolidate
recognition of transitive properties, 2024-04-12) a lint suppression
added by commit fb461cacba (silence selected clang-tidy violations,
2016-10-18, v3.8.0-rc1~428^2~1) is no longer needed.
In commit ff6c401309 (cmTarget: Add interface for compatible numeric
properties, 2013-10-22, v3.0.0-rc1~460^2) the condition
dagCheckerParent && !dagCheckerParent->EvaluatingLinkLibraries()
was written that way to avoid a nullptr dereference, but is actually
meant to say "is not evaluating link libraries". That can also be true
when there is no `dagCheckerParent`, such as when evaluating a generator
expression outside of usage requirements, e.g., for `add_custom_target`.
The original commit tried to account for that by duplicating the
implementation in another code path, but that did not work in all cases.
Fix the condition, remove the duplication, and enable tests for the
now-working cases.
The `IsLinkInterfaceDependent*Property` methods internally exclude
INTERFACE libraries since commit 0bfcb450e6 (INTERFACE_LIBRARY: Avoid
codepaths which set unneeded properties., 2013-11-20, v3.0.0-rc1~301^2~1).
Refactoring in commit 72d116ee68 (GenEx: list oriented genexes use
cmList class, 2023-03-29, v3.27.0-rc1~205^2) accidentally caused
empty elements to be dropped by the `REMOVE_DUPLICATES` genex.
Fix it and add a test case.
Fixes: #25080
This generator expression is the inverse of `LINK_ONLY` and only coveys
usage requirements for the purposes of compilation. Its intended use is
to avoid needing to export targets that do not have link usage
requirements (e.g., header-only libraries) when used by another target.
See: #15415