From b2a798fe32ce25e5ea19f6487ce9cadf9852ea83 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Sun, 4 Nov 2018 15:07:42 +0100 Subject: Help: expand "ver", "pol", ... No need to save a few characters on formal parameters. Use this occasion to correct $: the parameter is a platform_id, not a compiler_id. --- Help/manual/cmake-generator-expressions.7.rst | 42 +++++++++++++++------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 24b79d4..95de378 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -68,21 +68,24 @@ Available logical expressions are: ``1`` if ``a`` is EQUAL ``b`` in a numeric comparison, else ``0`` ``$`` ``1`` if ``a`` is IN_LIST ``b``, else ``0`` -``$`` - ``1`` if ``tgt`` is an existed target name, else ``0``. +``$`` + ``1`` if ``target`` exists, else ``0``. ``$`` ``1`` if config is ``cfg``, else ``0``. This is a case-insensitive comparison. The mapping in :prop_tgt:`MAP_IMPORTED_CONFIG_` is also considered by this expression when it is evaluated on a property on an :prop_tgt:`IMPORTED` target. -``$`` - ``1`` if the CMake-id of the platform matches ``comp``, otherwise ``0``. +``$`` + ``1`` if the CMake-id of the platform matches ``platform_id`` + otherwise ``0``. See also the :variable:`CMAKE_SYSTEM_NAME` variable. -``$`` - ``1`` if the CMake-id of the C compiler matches ``comp``, otherwise ``0``. +``$`` + ``1`` if the CMake-id of the C compiler matches ``compiler_id``, + otherwise ``0``. See also the :variable:`CMAKE__COMPILER_ID` variable. -``$`` - ``1`` if the CMake-id of the CXX compiler matches ``comp``, otherwise ``0``. +``$`` + ``1`` if the CMake-id of the CXX compiler matches ``compiler_id``, + otherwise ``0``. See also the :variable:`CMAKE__COMPILER_ID` variable. ``$`` ``1`` if ``v1`` is a version less than ``v2``, else ``0``. @@ -94,27 +97,28 @@ Available logical expressions are: ``1`` if ``v1`` is a version less than or equal to ``v2``, else ``0``. ``$`` ``1`` if ``v1`` is a version greater than or equal to ``v2``, else ``0``. -``$`` - ``1`` if the version of the C compiler matches ``ver``, otherwise ``0``. +``$`` + ``1`` if the version of the C compiler matches ``version``, otherwise ``0``. See also the :variable:`CMAKE__COMPILER_VERSION` variable. -``$`` - ``1`` if the version of the CXX compiler matches ``ver``, otherwise ``0``. +``$`` + ``1`` if the version of the CXX compiler matches ``version``, otherwise ``0``. See also the :variable:`CMAKE__COMPILER_VERSION` variable. -``$`` - ``1`` if the policy ``pol`` was NEW when the 'head' target was created, - else ``0``. If the policy was not set, the warning message for the policy +``$`` + ``1`` if the ``policy`` was NEW when the 'head' target was created, + else ``0``. If the ``policy`` was not set, the warning message for the policy will be emitted. This generator expression only works for a subset of policies. -``$`` - ``1`` if all of the ``feature`` features are available for the 'head' +``$`` + where ``features`` is a comma-spearated list. + Evaluates to ``1`` if all of the ``features`` are available for the 'head' target, and ``0`` otherwise. If this expression is used while evaluating the link implementation of a target and if any dependency transitively increases the required :prop_tgt:`C_STANDARD` or :prop_tgt:`CXX_STANDARD` for the 'head' target, an error is reported. See the :manual:`cmake-compile-features(7)` manual for information on compile features and a list of supported compilers. -``$`` - ``1`` when the language used for compilation unit matches ``lang``, +``$`` + ``1`` when the language used for compilation unit matches ``language``, otherwise ``0``. This expression may be used to specify compile options, compile definitions, and include directories for source files of a particular language in a target. For example: -- cgit v0.12