diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-05-29 18:55:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-03 14:20:23 (GMT) |
commit | ec66af2026e085e7b648b222794f0f213183ea1e (patch) | |
tree | 349db0d7cc51317dce0572bfff44878ec85a39d4 /Help/manual/cmake-generator-expressions.7.rst | |
parent | 2d4787fc4ddc077e1d8fcb807768d1ecc7902a73 (diff) | |
download | CMake-ec66af2026e085e7b648b222794f0f213183ea1e.zip CMake-ec66af2026e085e7b648b222794f0f213183ea1e.tar.gz CMake-ec66af2026e085e7b648b222794f0f213183ea1e.tar.bz2 |
Genex: CompilerId now can match against a list of ids.
This allows for expressions like:
$<$<CXX_COMPILER_ID:Clang,GNU>:-DMY_PRIVATE_DEFINE>
Diffstat (limited to 'Help/manual/cmake-generator-expressions.7.rst')
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index f2e6597..c03e701 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -114,20 +114,25 @@ Variable Queries ``1`` if the CMake's platform id matches ``platform_id`` otherwise ``0``. See also the :variable:`CMAKE_SYSTEM_NAME` variable. -``$<C_COMPILER_ID:compiler_id>`` - ``1`` if the CMake's compiler id of the C compiler matches ``compiler_id``, - otherwise ``0``. +``$<C_COMPILER_ID:compiler_ids>`` + where ``compiler_ids`` is a comma-separated list. + ``1`` if the CMake's compiler id of the C compiler matches any one + of the entries in ``compiler_ids``, otherwise ``0``. See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable. -``$<CXX_COMPILER_ID:compiler_id>`` - ``1`` if the CMake's compiler id of the CXX compiler matches ``compiler_id``, - otherwise ``0``. -``$<CUDA_COMPILER_ID:compiler_id>`` - ``1`` if the CMake's compiler id of the CUDA compiler matches ``compiler_id``, - otherwise ``0``. +``$<CXX_COMPILER_ID:compiler_ids>`` + where ``compiler_ids`` is a comma-separated list. + ``1`` if the CMake's compiler id of the CXX compiler matches any one + of the entries in ``compiler_ids``, otherwise ``0``. See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable. -``$<Fortran_COMPILER_ID:compiler_id>`` - ``1`` if the CMake's compiler id of the Fortran compiler matches ``compiler_id``, - otherwise ``0``. +``$<CUDA_COMPILER_ID:compiler_ids>`` + where ``compiler_ids`` is a comma-separated list. + ``1`` if the CMake's compiler id of the CUDA compiler matches any one + of the entries in ``compiler_ids``, otherwise ``0``. + See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable. +``$<Fortran_COMPILER_ID:compiler_ids>`` + where ``compiler_ids`` is a comma-separated list. + ``1`` if the CMake's compiler id of the Fortran compiler matches any one + of the entries in ``compiler_ids``, otherwise ``0``. See also the :variable:`CMAKE_<LANG>_COMPILER_ID` variable. ``$<C_COMPILER_VERSION:version>`` ``1`` if the version of the C compiler matches ``version``, otherwise ``0``. |