diff options
author | Brad King <brad.king@kitware.com> | 2022-05-17 15:08:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-05-17 15:09:15 (GMT) |
commit | 23a52561c73638fe865c71ed3ddd9457524a5a85 (patch) | |
tree | e0699203b3bd86c02c75e98199bd00a655c52c4d /Modules/Platform/Windows-Clang.cmake | |
parent | 5b3096198a0b3a795684a42c9b71c7816151f053 (diff) | |
download | CMake-23a52561c73638fe865c71ed3ddd9457524a5a85.zip CMake-23a52561c73638fe865c71ed3ddd9457524a5a85.tar.gz CMake-23a52561c73638fe865c71ed3ddd9457524a5a85.tar.bz2 |
Clang: Use -imsvc flag without space to support Clang tools
Since commit bb61c2d024 (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 commit 3a8b6653dc (MSVC: Use -external:I flag
without space to support Clang tools, 2022-01-11, v3.22.2~8^2).
Fixes: #23517
Diffstat (limited to 'Modules/Platform/Windows-Clang.cmake')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index e7e975d..4d3de0e 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -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) |