diff options
author | Brad King <brad.king@kitware.com> | 2023-03-21 12:58:16 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-21 12:58:43 (GMT) |
commit | ca8c171021369f535fa18013796cc0b8f9cbd4fc (patch) | |
tree | fe86b75fd9f168720d40c29d0763af751ddba1ab /Modules | |
parent | 5f8929f721966f7560d18811126d74553af3df5f (diff) | |
parent | 1b7c26da49e7e1a337f66951424bda8d3f4067fc (diff) | |
download | CMake-ca8c171021369f535fa18013796cc0b8f9cbd4fc.zip CMake-ca8c171021369f535fa18013796cc0b8f9cbd4fc.tar.gz CMake-ca8c171021369f535fa18013796cc0b8f9cbd4fc.tar.bz2 |
Merge topic 'clang-windows-cxx-modules'
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.cmake | 28 |
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() |