summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
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()