summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-25 11:27:43 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-25 11:36:10 (GMT)
commit7077a554f14ad1cc5682d6bc8c2d05d1aff2a270 (patch)
tree17afa7db786cf27b2b3bff16c0d0acc751e207a9 /Modules/Platform
parenta91eb5e41f486628910f189bf40403568af013c7 (diff)
downloadCMake-7077a554f14ad1cc5682d6bc8c2d05d1aff2a270.zip
CMake-7077a554f14ad1cc5682d6bc8c2d05d1aff2a270.tar.gz
CMake-7077a554f14ad1cc5682d6bc8c2d05d1aff2a270.tar.bz2
Clang: Use -TP flag for C++ sources with clang-cl
We do this for `cl`, so we should do it for `clang-cl`. Fixes: #17394
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-Clang-CXX.cmake1
-rw-r--r--Modules/Platform/Windows-Clang.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Clang-CXX.cmake b/Modules/Platform/Windows-Clang-CXX.cmake
index 2c3688a..f1d40f2 100644
--- a/Modules/Platform/Windows-Clang-CXX.cmake
+++ b/Modules/Platform/Windows-Clang-CXX.cmake
@@ -1,2 +1,3 @@
include(Platform/Windows-Clang)
+set(_COMPILE_CXX_MSVC " -TP")
__windows_compiler_clang(CXX)
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index bcfda93..007ae53 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -12,6 +12,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
include(Platform/Windows-MSVC)
macro(__windows_compiler_clang lang)
+ set(_COMPILE_${lang} "${_COMPILE_${lang}_MSVC}")
__windows_compiler_msvc(${lang})
endmacro()
else()