diff options
author | Brad King <brad.king@kitware.com> | 2017-06-14 14:12:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-14 14:36:57 (GMT) |
commit | ba247ccabab05c0aad4fe7f56dd020bfa8ff4583 (patch) | |
tree | 259898e83b41d70b454287d01e88923ecb1bbd4e /Modules/Platform/Linux-Intel.cmake | |
parent | d025faf436c86ee9cc033fbb324a9bc2c18757fa (diff) | |
download | CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.zip CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.tar.gz CMake-ba247ccabab05c0aad4fe7f56dd020bfa8ff4583.tar.bz2 |
IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages. Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.
Fixes: #16944
Diffstat (limited to 'Modules/Platform/Linux-Intel.cmake')
-rw-r--r-- | Modules/Platform/Linux-Intel.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/Platform/Linux-Intel.cmake b/Modules/Platform/Linux-Intel.cmake index 6e2978a..ee9aac2 100644 --- a/Modules/Platform/Linux-Intel.cmake +++ b/Modules/Platform/Linux-Intel.cmake @@ -30,7 +30,7 @@ macro(__linux_compiler_intel lang) # executables that use dlopen but do not set ENABLE_EXPORTS. set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic") - set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) + set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES) if(XIAR) # INTERPROCEDURAL_OPTIMIZATION @@ -38,10 +38,10 @@ macro(__linux_compiler_intel lang) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY_IPO "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> " "${XIAR} -s <TARGET> ") - set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) - set(_CMAKE_IPO_LEGACY_BEHAVIOR YES) + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) + set(_CMAKE_${lang}_IPO_LEGACY_BEHAVIOR YES) else() - set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) endif() if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0) |