Suggested documentation tweaks for cmake-generator-expressions
That documentation refers to the same logic as in the COMPILE_LANG_AND_ID example, but that previous example includes AppleClang so this example should include that as well as indicated in the following diff.
software@merlin> git diff --unified=6
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 6e7f9b5b83..ba9887c62f 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -208,13 +208,13 @@ Variable Queries
Without the ``COMPILE_LANG_AND_ID`` generator expression the same logic
would be expressed as:
.. code-block:: cmake
target_compile_definitions(myapp
- PRIVATE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:Clang>>:COMPILING_CXX_WITH_CLANG>
+ PRIVATE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:AppleClang,Clang>>:COMPILING_CXX_WITH_CLANG>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:Intel>>:COMPILING_CXX_WITH_INTEL>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:Clang>>:COMPILING_C_WITH_CLANG>
)
``$<COMPILE_LANGUAGE:languages>``
``1`` when the language used for compilation unit matches any of the entries
Elsewhere in the file (I don't bother to express it with a diff this time, but you should get the idea) I also noticed that the following change should be made
cxx_headers include directory for C++ only (compiler id checks elided).
==>
/opt/foo/headers include directory for C++ and CUDA.
Edited by Alan W. Irwin