diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-03-30 02:57:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-30 14:16:10 (GMT) |
commit | e05835c35b5d31f31e1a55baf415c075b24a27ad (patch) | |
tree | a4cbdc61542825d4998b2d173fd19caa8a9de4e6 /Tests/RunCMake/CheckIPOSupported | |
parent | 9a733c7bd626f457a71632da46934995da7bbd4b (diff) | |
download | CMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.zip CMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.tar.gz CMake-e05835c35b5d31f31e1a55baf415c075b24a27ad.tar.bz2 |
CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
Diffstat (limited to 'Tests/RunCMake/CheckIPOSupported')
5 files changed, 18 insertions, 1 deletions
diff --git a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake index e304c61..2815037 100644 --- a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake @@ -7,3 +7,7 @@ run_cmake(default-lang-none) run_cmake(not-supported-by-cmake) run_cmake(not-supported-by-compiler) run_cmake(save-to-result) + +if(RunCMake_GENERATOR MATCHES "^(Visual Studio |Xcode$)") + run_cmake(not-supported-by-generator) +endif() diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt index 73e2f26..5f5f410 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 \(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-generator-result.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt new file mode 100644 index 0000000..a2aa58c --- /dev/null +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\): + IPO is not supported \(CMake doesn't support IPO for current generator\)\. +Call Stack \(most recent call first\): + .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(_ipo_not_supported\) + not-supported-by-generator\.cmake:[0-9]+ \(check_ipo_supported\) + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake new file mode 100644 index 0000000..dc0fa09 --- /dev/null +++ b/Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake @@ -0,0 +1,6 @@ +project(${RunCMake_TEST} LANGUAGES C) + +set(_CMAKE_IPO_SUPPORTED_BY_CMAKE YES) +set(_CMAKE_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) + +check_ipo_supported() |