diff options
author | Brad King <brad.king@kitware.com> | 2021-02-09 16:24:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-09 16:24:41 (GMT) |
commit | 2fc5e5dba903da4c845b41f60fa9adb59c7cfbd1 (patch) | |
tree | 72f8795eb77d26a23c60da9289a9f655e42bf651 /Modules | |
parent | 340ca27f8d36f0a09382c22130ca8d4f2c030968 (diff) | |
download | CMake-2fc5e5dba903da4c845b41f60fa9adb59c7cfbd1.zip CMake-2fc5e5dba903da4c845b41f60fa9adb59c7cfbd1.tar.gz CMake-2fc5e5dba903da4c845b41f60fa9adb59c7cfbd1.tar.bz2 |
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
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/Clang.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 27692c2..c43265d 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -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) diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index 389d6ab..7697407 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -169,6 +169,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" macro(__windows_compiler_clang_base lang) set(_COMPILE_${lang} "${_COMPILE_${lang}_MSVC}") __windows_compiler_msvc(${lang}) + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc ") endmacro() else() cmake_policy(GET CMP0091 __WINDOWS_CLANG_CMP0091) |