summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-compile-features.7.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/manual/cmake-compile-features.7.rst')
-rw-r--r--Help/manual/cmake-compile-features.7.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst
index 8a2fe30..8e3dbb8 100644
--- a/Help/manual/cmake-compile-features.7.rst
+++ b/Help/manual/cmake-compile-features.7.rst
@@ -276,10 +276,13 @@ properties:
.. code-block:: cmake
add_library(foo INTERFACE)
+ set(with_variadics ${CMAKE_CURRENT_SOURCE_DIR}/with_variadics)
+ set(no_variadics ${CMAKE_CURRENT_SOURCE_DIR}/no_variadics)
target_link_libraries(foo
INTERFACE
- "$<$<COMPILE_FEATURES:cxx_variadic_templates>:${CMAKE_CURRENT_SOURCE_DIR}/with_variadics>"
- "$<$<NOT:$<COMPILE_FEATURES:cxx_variadic_templates>>:${CMAKE_CURRENT_SOURCE_DIR}/no_variadics>")
+ "$<$<COMPILE_FEATURES:cxx_variadic_templates>:${with_variadics}>"
+ "$<$<NOT:$<COMPILE_FEATURES:cxx_variadic_templates>>:${no_variadics}>"
+ )
Consuming code then simply links to the ``foo`` target as usual and uses
the feature-appropriate include directory