summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-21 12:58:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-21 12:58:42 (GMT)
commit15a86d45d11e70c1224cacd0c894d1365ebd2ae7 (patch)
tree112e651bf5811aa10b5819856dd0ccc284f14aca /Modules
parent90d90a5d9170c66da8fb5865b80d4fb4bc4cc23e (diff)
parent1b7c26da49e7e1a337f66951424bda8d3f4067fc (diff)
downloadCMake-15a86d45d11e70c1224cacd0c894d1365ebd2ae7.zip
CMake-15a86d45d11e70c1224cacd0c894d1365ebd2ae7.tar.gz
CMake-15a86d45d11e70c1224cacd0c894d1365ebd2ae7.tar.bz2
Merge topic 'clang-windows-cxx-modules' into release-3.26
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end 6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows 8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8346
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/Clang-CXX.cmake28
1 files changed, 15 insertions, 13 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 33154fd..a74e90b 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -30,16 +30,18 @@ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
endif()
endif()
-if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
- string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
- "${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}"
- " -format=p1689"
- " --"
- " <CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS>"
- " -x c++ <SOURCE> -c -o <OBJECT>"
- " -MT <DYNDEP_FILE>"
- " -MD -MF <DEP_FILE>"
- " > <DYNDEP_FILE>")
- set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang")
- set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>")
-endif ()
+if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0)
+ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
+ string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
+ "\"${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}\""
+ " -format=p1689"
+ " --"
+ " <CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS>"
+ " -x c++ <SOURCE> -c -o <OBJECT>"
+ " -MT <DYNDEP_FILE>"
+ " -MD -MF <DEP_FILE>"
+ " > <DYNDEP_FILE>")
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "clang")
+ set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "@<MODULE_MAP_FILE>")
+ endif()
+endif()