diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2023-04-11 19:49:52 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2023-05-04 13:39:06 (GMT) |
commit | c42630ee62df80e649211e99c510cab7ac28fc0b (patch) | |
tree | 8b450a62d4e4c9559b8fe03b11575bde8d154608 /Help | |
parent | 0fb923c46041d67110c8e0907afdf66b3b25f25a (diff) | |
download | CMake-c42630ee62df80e649211e99c510cab7ac28fc0b.zip CMake-c42630ee62df80e649211e99c510cab7ac28fc0b.tar.gz CMake-c42630ee62df80e649211e99c510cab7ac28fc0b.tar.bz2 |
cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
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
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 186a9d2..da7df70 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -966,15 +966,18 @@ Compile Context .. versionadded:: 3.27 - Content of ``...``, except while collecting :ref:`Target Usage Requirements`, - 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 - compilation requirements without other usage requirements. + 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 ^^^^^^^^^^^^^^^^^^^^^^ |