summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-10 14:51:38 -0400
committerBrad King <brad.king@kitware.com>2017-10-10 14:56:43 -0400
commitb6d3a1c09a796ec0c29074c387953fb88ebfe874 (patch)
treed5290133c7d7e8bedbc05507666935ca7297fa36 /Modules/CMakeDetermineCCompiler.cmake
parenta91eb5e41f486628910f189bf40403568af013c7 (diff)
downloadcmake-b6d3a1c09a796ec0c29074c387953fb88ebfe874.tar.gz
Clang: Diagnose unsupported GNU-like clang targeting MSVC ABI
The LLVM/Clang installer on Windows provides a `LLVM/bin` directory containing `clang.exe` and `clang++.exe` command-line tools that have a GNU-like command-line but target the MSVC ABI (instead of MinGW). We do not support this combination, so diagnose and reject it explicitly. Tell users what to do to use the `clang-cl.exe` tool instead. Issue: #16439
Diffstat (limited to 'Modules/CMakeDetermineCCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index fcbda20fbd..4e56ce1cfb 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -110,6 +110,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
+ CMAKE_DIAGNOSE_UNSUPPORTED_CLANG(C CC)
# Set old compiler and platform id variables.
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")