diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-03-07 12:18:28 (GMT) |
---|---|---|
committer | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-03-11 11:46:25 (GMT) |
commit | fdb2ba2521998397d97d466b10a8ac2458363625 (patch) | |
tree | 14c2d5cec41cb22d3dcd64aa23e4d9cbdd2001ee /Modules/Platform | |
parent | 0b2438118ad93479de09f0d7a0e9b77859f9a9c3 (diff) | |
download | CMake-fdb2ba2521998397d97d466b10a8ac2458363625.zip CMake-fdb2ba2521998397d97d466b10a8ac2458363625.tar.gz CMake-fdb2ba2521998397d97d466b10a8ac2458363625.tar.bz2 |
CheckIPOSupported: New module to check for compiler/cmake IPO support
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Linux-Intel.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Platform/Linux-Intel.cmake b/Modules/Platform/Linux-Intel.cmake index 85a0772..45dc36f 100644 --- a/Modules/Platform/Linux-Intel.cmake +++ b/Modules/Platform/Linux-Intel.cmake @@ -30,12 +30,17 @@ 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) + if(XIAR) # INTERPROCEDURAL_OPTIMIZATION set(CMAKE_${lang}_COMPILE_OPTIONS_IPO -ipo) 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) + else() + set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) endif() if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0) |