Commit 863f7eb6 authored by Brad King's avatar Brad King

clang: Restore support for clang-cl on non-Windows hosts

The frontend variant detection logic added by commit 53fbe23f (clang:
introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT, 2019-02-20,
v3.15.0-rc1~41^2~8) assumes that `clang-cl` only runs on a Windows host.
It is also available on non-Windows hosts.  Fix the condition.

Fixes: #19544
parent f43a7d76
......@@ -138,7 +138,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
set(_variant "")
if("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xClang")
if(CMAKE_HOST_WIN32 AND "x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "MSVC")
else()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment