diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 8a2fe30a4..8e3dbb8ad 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 - "$<$:${CMAKE_CURRENT_SOURCE_DIR}/with_variadics>" - "$<$>:${CMAKE_CURRENT_SOURCE_DIR}/no_variadics>") + "$<$:${with_variadics}>" + "$<$>:${no_variadics}>" + ) Consuming code then simply links to the ``foo`` target as usual and uses the feature-appropriate include directory diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 625dac06b..eea5fc35c 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1005,7 +1005,8 @@ projects that do not require a high enough CMake version. .. code-block:: cmake if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.0.0) - message(AUTHOR_WARNING "Your project should require at least CMake 3.0.0 to use FindFoo.cmake") + message(AUTHOR_WARNING + "Your project should require at least CMake 3.0.0 to use FindFoo.cmake") endif() Now the actual libraries and so on have to be found. The code here will diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 77259a0f3..981bd8415 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -38,6 +38,8 @@ create conditional output:: expands to ``DEBUG_MODE`` when the ``Debug`` configuration is used, and otherwise expands to nothing. +Available logical expressions are: + ``$<0:...>`` Empty string (ignores ``...``) ``$<1:...>`` @@ -111,6 +113,8 @@ expands to ``OLD_COMPILER`` if the :variable:`CMAKE_CXX_COMPILER_VERSION _COMPILER_VERSION>` is less than 4.2.0. +Available informational expressions are: + ``$`` Configuration name. Deprecated. Use ``CONFIG`` instead. ``$`` @@ -185,7 +189,13 @@ property with each entry preceeded by ``-I``. Note that a more-complete use in this situation would require first checking if the INCLUDE_DIRECTORIES property is non-empty:: - $<$>:-I$, -I>> + $<$:-I$> + +where ``${prop}`` refers to a helper variable:: + + set(prop "$") + +Available output expressions are: ``$`` Joins the list with the content of ``...`` diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index 1621b5ffd..fad5481ee 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -115,8 +115,9 @@ as: set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs) set(CMAKE_STAGING_PREFIX /home/devel/stage) - set(CMAKE_C_COMPILER /home/devel/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc) - set(CMAKE_CXX_COMPILER /home/devel/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++) + set(tools /home/devel/gcc-4.7-linaro-rpi-gnueabihf) + set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc) + set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)