mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
Clang: Use -imsvc flag without space to support Clang tools
Since commitbb61c2d024(Clang: use -imsvc for system include dirs when running on Windows, 2020-09-16, v3.19.0-rc1~162^2) we use the `-imsvc` flag followed by the include directory as a separate argument. Some versions of `clang-tidy` do not support the flag unless the include directory is attached to it, so use that form instead. A similar fix was made by commit3a8b6653dc(MSVC: Use -external:I flag without space to support Clang tools, 2022-01-11, v3.22.2~8^2). Fixes: #23517
This commit is contained in:
@@ -182,7 +182,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 ")
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc")
|
||||
endmacro()
|
||||
else()
|
||||
cmake_policy(GET CMP0091 __WINDOWS_CLANG_CMP0091)
|
||||
|
||||
Reference in New Issue
Block a user