diff options
author | Brad King <brad.king@kitware.com> | 2023-05-05 16:42:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-05 16:42:23 (GMT) |
commit | 5924630e6d4a383ef76412a6f560fbe852837e50 (patch) | |
tree | fbab8184157448c3251e09feee8e4ce5c0b6234e /Help | |
parent | 2b5b09556c08bdbcd949e600daa3059f63da240a (diff) | |
parent | c42630ee62df80e649211e99c510cab7ac28fc0b (diff) | |
download | CMake-5924630e6d4a383ef76412a6f560fbe852837e50.zip CMake-5924630e6d4a383ef76412a6f560fbe852837e50.tar.gz CMake-5924630e6d4a383ef76412a6f560fbe852837e50.tar.bz2 |
Merge topic 'compile-only-genex'
c42630ee62 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
0fb923c460 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8411
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 22 | ||||
-rw-r--r-- | Help/release/dev/genex-compile-only.rst | 5 |
2 files changed, 26 insertions, 1 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 9d29dc3..473e8d7 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -1219,6 +1219,25 @@ Compile Features :manual:`cmake-compile-features(7)` manual for information on compile features and a list of supported compilers. +Compile Context +^^^^^^^^^^^^^^^ + +.. genex:: $<COMPILE_ONLY:...> + + .. versionadded:: 3.27 + + Content of ``...``, when collecting :ref:`Target Usage Requirements`, + otherwise it is the empty string. This is intended for use in an + :prop_tgt:`INTERFACE_LINK_LIBRARIES` and :prop_tgt:`LINK_LIBRARIES` target + properties, typically populated via the :command:`target_link_libraries` command. + Provides compilation usage requirements without any linking requirements. + + Use cases include header-only usage where all usages are known to not have + linking requirements (e.g., all-``inline`` or C++ template libraries). + + Note that for proper evaluation of this expression requires policy :policy:`CMP0099` + to be set to `NEW`. + Linker Language And ID ^^^^^^^^^^^^^^^^^^^^^^ @@ -1599,7 +1618,8 @@ Link Context in which case it is the empty string. This is intended for use in an :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property, typically populated via the :command:`target_link_libraries` command, to specify private link - dependencies without other usage requirements. + dependencies without other usage requirements such as include directories or + compile options. .. versionadded:: 3.24 ``LINK_ONLY`` may also be used in a :prop_tgt:`LINK_LIBRARIES` target diff --git a/Help/release/dev/genex-compile-only.rst b/Help/release/dev/genex-compile-only.rst new file mode 100644 index 0000000..1f898d8 --- /dev/null +++ b/Help/release/dev/genex-compile-only.rst @@ -0,0 +1,5 @@ +genex-compile-only +------------------ + +* The :genex:`COMPILE_ONLY` generator expression has been added which provides + compilation usage requirements without any linking requirements. |