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/CheckIPOSupported | |
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/CheckIPOSupported')
5 files changed, 7 insertions, 7 deletions
diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake-stderr.txt index f63f30f..c49a024 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake-stderr.txt +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake-stderr.txt @@ -1,5 +1,5 @@ ^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\): - IPO is not supported \(CMake doesn't support IPO for current compiler\)\. + IPO is not supported \(CMake doesn't support IPO for current C compiler\)\. Call Stack \(most recent call first\): .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\) not-supported-by-cmake\.cmake:[0-9]+ \(check_ipo_supported\) diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake.cmake index 6f61f7e..e583dd0 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake.cmake +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake.cmake @@ -1,3 +1,3 @@ project(${RunCMake_TEST} LANGUAGES C) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE NO) +set(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE NO) check_ipo_supported() diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt index 5f5f410..675c2d3 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt @@ -1,5 +1,5 @@ ^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\): - IPO is not supported \(Compiler doesn't support IPO\)\. + IPO is not supported \(C compiler doesn't support IPO\)\. Call Stack \(most recent call first\): .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\) not-supported-by-compiler\.cmake:[0-9]+ \(check_ipo_supported\) diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler.cmake index 652cfd5..86c8f8d 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler.cmake +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler.cmake @@ -1,4 +1,4 @@ project(${RunCMake_TEST} LANGUAGES C) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) +set(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE YES) +set(_CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) check_ipo_supported() diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake index dc0fa09..c32af6e 100644 --- a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake @@ -1,6 +1,6 @@ project(${RunCMake_TEST} LANGUAGES C) -set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) -set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) +set(_CMAKE_C_IPO_SUPPORTED_BY_CMAKE YES) +set(_CMAKE_C_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) check_ipo_supported() |