diff options
author | Brad King <brad.king@kitware.com> | 2024-01-25 15:16:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-01-25 15:16:54 (GMT) |
commit | c923b8a3e29a492397f4bceb9794f67334e2cd6e (patch) | |
tree | e6e3f219c67b96dba6dfb78ca7b6c8fc2c29ccfa | |
parent | 35246ed9c4bba6980d4cc95cda1be534231eaa1d (diff) | |
parent | 8218aed118f3d84b011f8b87385704a8cd603d3d (diff) | |
download | CMake-c923b8a3e29a492397f4bceb9794f67334e2cd6e.zip CMake-c923b8a3e29a492397f4bceb9794f67334e2cd6e.tar.gz CMake-c923b8a3e29a492397f4bceb9794f67334e2cd6e.tar.bz2 |
Merge topic 'IntelLLVM-isystem-flag'
8218aed118 IntelLLVM: support marking include paths as SYSTEM directories
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8722
-rw-r--r-- | Help/release/dev/IntelLLVM-isystem-flag.rst | 6 | ||||
-rw-r--r-- | Modules/Compiler/IntelLLVM.cmake | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Help/release/dev/IntelLLVM-isystem-flag.rst b/Help/release/dev/IntelLLVM-isystem-flag.rst new file mode 100644 index 0000000..bba3d26 --- /dev/null +++ b/Help/release/dev/IntelLLVM-isystem-flag.rst @@ -0,0 +1,6 @@ +IntelLLVM-isystem-flag +---------------------- + +* The :generator:`Ninja` and :generator:`NMake Makefiles` generators now use + the ``-external:I`` flag for system includes when using IntelLLVM as of + version 2021.4. The ``-external:W0`` flag is also used as of version 2022.2. 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 |