summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.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/CMakeDetermineCXXCompiler.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/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 8c33eb6345..454184429e 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -105,6 +105,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
+ CMAKE_DIAGNOSE_UNSUPPORTED_CLANG(CXX CXX)
# Set old compiler and platform id variables.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")