summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-Clang-C.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-02 13:21:12 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-02 13:21:12 (GMT)
commitbdfa5ac7f6cfc961665064f1b7a1395cfd0b2281 (patch)
tree9f9c8f4ef0db863fb6adc0ae70891477d66d1cdb /Modules/Platform/Windows-Clang-C.cmake
parentf7ff0d34f0750387f5c56483ab6ba3fb4825b62d (diff)
parent628d7ef67258f67e0b4086905011d90727d8b9a1 (diff)
downloadCMake-bdfa5ac7f6cfc961665064f1b7a1395cfd0b2281.zip
CMake-bdfa5ac7f6cfc961665064f1b7a1395cfd0b2281.tar.gz
CMake-bdfa5ac7f6cfc961665064f1b7a1395cfd0b2281.tar.bz2
Merge branch 'master' into llvm-rc-preprocess-as-c
Diffstat (limited to 'Modules/Platform/Windows-Clang-C.cmake')
-rw-r--r--Modules/Platform/Windows-Clang-C.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Clang-C.cmake b/Modules/Platform/Windows-Clang-C.cmake
index d007105..322e3fb 100644
--- a/Modules/Platform/Windows-Clang-C.cmake
+++ b/Modules/Platform/Windows-Clang-C.cmake
@@ -1,2 +1,18 @@
include(Platform/Windows-Clang)
__windows_compiler_clang(C)
+
+if("x${MAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
+ if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+ AND CMAKE_DEPFILE_FLAGS_C)
+ set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+ endif()
+elseif("x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
+ if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+ AND CMAKE_DEPFILE_FLAGS_C)
+ # dependencies are computed by the compiler itself
+ set(CMAKE_C_DEPFILE_FORMAT gcc)
+ set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+ endif()
+endif()