diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-15 16:36:00 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-01-24 19:21:05 (GMT) |
commit | 8218aed118f3d84b011f8b87385704a8cd603d3d (patch) | |
tree | da41d0437c195082c9ec8527849832bf0aca6d42 /Modules | |
parent | ad50700038ab936c57ab1043f65b7f888ff62612 (diff) | |
download | CMake-8218aed118f3d84b011f8b87385704a8cd603d3d.zip CMake-8218aed118f3d84b011f8b87385704a8cd603d3d.tar.gz CMake-8218aed118f3d84b011f8b87385704a8cd603d3d.tar.bz2 |
IntelLLVM: support marking include paths as SYSTEM directories
Also learn how to suppress warnings when possible.
See: https://discourse.cmake.org/t/icx-on-windows-supports-external-i/8739
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/IntelLLVM.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Compiler/IntelLLVM.cmake b/Modules/Compiler/IntelLLVM.cmake index f3c0bf4..a58128a 100644 --- a/Modules/Compiler/IntelLLVM.cmake +++ b/Modules/Compiler/IntelLLVM.cmake @@ -36,6 +36,12 @@ if(CMAKE_HOST_WIN32) __compiler_intel_llvm_common(${lang}) set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-Qipo") set(CMAKE_${lang}_LINK_OPTIONS_IPO "-Qipo") + if (CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL "2021.4") + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-external:I") + if (CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL "2022.2") + set(_CMAKE_INCLUDE_SYSTEM_FLAG_${lang}_WARNING "-external:W0 ") + endif () + endif () endmacro() else() # GNU-like |