mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
Clang: Use -imsvc for system include only with MSVC-like front-end
In commit bb61c2d024 (Clang: use -imsvc for system include dirs when
running on Windows, 2020-09-16, v3.19.0-rc1~162^2) we added `-imsvc`
for all Clang compilers targeting the MSVC ABI. However, the option
only exists for the MSVC-like front-end. The GNU-like front-ends
use `-isystem`.
Fixes: #21789
This commit is contained in:
@@ -19,7 +19,6 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
macro(__compiler_clang lang)
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc ")
|
||||
endmacro()
|
||||
else()
|
||||
include(Compiler/GNU)
|
||||
|
||||
Reference in New Issue
Block a user