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 /Tests/RunCMake/CMP0069 | |
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 'Tests/RunCMake/CMP0069')
-rw-r--r-- | Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0069/CMP0069-WARN.cmake | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake b/Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake index 23fae13..6968c8b 100644 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake +++ b/Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake @@ -1,6 +1,6 @@ cmake_policy(SET CMP0069 NEW) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE NO) +set(_CMAKE_CXX_IPO_SUPPORTED_BY_CMAKE NO) add_executable(foo main.cpp) set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake b/Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake index 24b409a..ecb197b 100644 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake +++ b/Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake @@ -1,7 +1,7 @@ cmake_policy(SET CMP0069 NEW) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) +set(_CMAKE_CXX_IPO_SUPPORTED_BY_CMAKE YES) +set(_CMAKE_CXX_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) add_executable(foo main.cpp) set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) diff --git a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake index df2a888..80d4e15 100644 --- a/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake +++ b/Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake @@ -1,7 +1,7 @@ cmake_policy(SET CMP0069 NEW) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) +set(_CMAKE_CXX_IPO_SUPPORTED_BY_CMAKE YES) +set(_CMAKE_CXX_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) add_executable(foo main.cpp) set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) diff --git a/Tests/RunCMake/CMP0069/CMP0069-WARN.cmake b/Tests/RunCMake/CMP0069/CMP0069-WARN.cmake index 0e3e670..2049c9e 100644 --- a/Tests/RunCMake/CMP0069/CMP0069-WARN.cmake +++ b/Tests/RunCMake/CMP0069/CMP0069-WARN.cmake @@ -1,4 +1,4 @@ -set(_CMAKE_IPO_LEGACY_BEHAVIOR NO) +set(_CMAKE_CXX_IPO_LEGACY_BEHAVIOR NO) add_executable(foo main.cpp) set_target_properties(foo PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) |