summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckIPOSupported
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CheckIPOSupported')
-rw-r--r--Tests/RunCMake/CheckIPOSupported/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-result.txt1
-rw-r--r--Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-stderr.txt5
-rw-r--r--Tests/RunCMake/CheckIPOSupported/cmp0069-is-old.cmake6
5 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
index a0effc9..4a13d29 100644
--- a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
+++ b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt
@@ -1,4 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(${RunCMake_TEST} NONE)
+
+cmake_policy(SET CMP0069 NEW)
+
include(CheckIPOSupported)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
index 2815037..812f79b 100644
--- a/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake
@@ -7,6 +7,7 @@ run_cmake(default-lang-none)
run_cmake(not-supported-by-cmake)
run_cmake(not-supported-by-compiler)
run_cmake(save-to-result)
+run_cmake(cmp0069-is-old)
if(RunCMake_GENERATOR MATCHES "^(Visual Studio |Xcode$)")
run_cmake(not-supported-by-generator)
diff --git a/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-result.txt b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-stderr.txt b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-stderr.txt
new file mode 100644
index 0000000..f183594
--- /dev/null
+++ b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at .*/Modules/CheckIPOSupported\.cmake:[0-9]+ \(message\):
+ Policy CMP0069 set to OLD
+Call Stack \(most recent call first\):
+ cmp0069-is-old\.cmake:[0-9]+ \(check_ipo_supported\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old.cmake b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old.cmake
new file mode 100644
index 0000000..14fed04
--- /dev/null
+++ b/Tests/RunCMake/CheckIPOSupported/cmp0069-is-old.cmake
@@ -0,0 +1,6 @@
+project(${RunCMake_TEST} LANGUAGES C CXX)
+
+cmake_policy(SET CMP0069 OLD)
+
+include(CheckIPOSupported)
+check_ipo_supported()