Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 2,682
    • Issues 2,682
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 22
    • Merge Requests 22
  • Packages
    • Packages
    • Container Registry
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #19862

Closed
Open
Opened Oct 21, 2019 by Alan W. Irwin@airwin
  • Report abuse
  • New issue
Report abuse New issue

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 Oct 21, 2019 by Alan W. Irwin
Assignee
Assign to
3.16.0
Milestone
3.16.0
Assign milestone
Time tracking
None
Due date
None
1
Labels
area:doc
Assign labels
  • View project labels
Reference: cmake/cmake#19862