diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-03-28 06:47:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-30 18:56:52 (GMT) |
commit | dfa8263f4be4f1413b73c81649fdc4567a71e56a (patch) | |
tree | 23e540d2dcb39793a0f9ef503e392fb854beb985 /Modules/Compiler/Clang.cmake | |
parent | 1588a577d16cfb1a689a444b1db1df3ccff2cc3d (diff) | |
download | CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.zip CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.tar.gz CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.tar.bz2 |
Implement interprocedural optimization for GNU compilers
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
Diffstat (limited to 'Modules/Compiler/Clang.cmake')
-rw-r--r-- | Modules/Compiler/Clang.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 96263fc..6b99a08 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -27,5 +27,13 @@ else() set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "--target=") set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "--gcc-toolchain=") endif() + + set(_CMAKE_IPO_SUPPORTED_BY_CMAKE NO) + set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) + + unset(CMAKE_${lang}_COMPILE_OPTIONS_IPO) + unset(CMAKE_${lang}_ARCHIVE_CREATE_IPO) + unset(CMAKE_${lang}_ARCHIVE_APPEND_IPO) + unset(CMAKE_${lang}_ARCHIVE_FINISH_IPO) endmacro() endif() |