summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-10 18:51:38 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-10 18:56:43 (GMT)
commitb6d3a1c09a796ec0c29074c387953fb88ebfe874 (patch)
treed5290133c7d7e8bedbc05507666935ca7297fa36 /Modules/CMakeDetermineCXXCompiler.cmake
parenta91eb5e41f486628910f189bf40403568af013c7 (diff)
downloadCMake-b6d3a1c09a796ec0c29074c387953fb88ebfe874.zip
CMake-b6d3a1c09a796ec0c29074c387953fb88ebfe874.tar.gz
CMake-b6d3a1c09a796ec0c29074c387953fb88ebfe874.tar.bz2
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 8c33eb6..4541844 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")