summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Policy/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-15 12:41:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-15 12:42:56 (GMT)
commit38acdc5d3a03f9621c729763312ad63c210d84c0 (patch)
tree67eaf4895b49770f71809652fc7190a8a30f7d9a /Tests/RunCMake/Policy/RunCMakeTest.cmake
parent7a0c28a76013986026417b36c008f5014b340f32 (diff)
parent8851637e9fc1e2acbc953032cfdffd33a2548959 (diff)
downloadCMake-38acdc5d3a03f9621c729763312ad63c210d84c0.zip
CMake-38acdc5d3a03f9621c729763312ad63c210d84c0.tar.gz
CMake-38acdc5d3a03f9621c729763312ad63c210d84c0.tar.bz2
Merge topic 'issue-21557-test-cases'
8851637e9f cmake_policy: Implement test cases for cmake_policy VERSION Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5610
Diffstat (limited to 'Tests/RunCMake/Policy/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/Policy/RunCMakeTest.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/Policy/RunCMakeTest.cmake b/Tests/RunCMake/Policy/RunCMakeTest.cmake
new file mode 100644
index 0000000..74c7d63
--- /dev/null
+++ b/Tests/RunCMake/Policy/RunCMakeTest.cmake
@@ -0,0 +1,19 @@
+include(RunCMake)
+
+run_cmake(VersionNotGiven)
+run_cmake(TooManyVersionsGiven)
+run_cmake(InvalidRangeMinVersionNotGiven)
+run_cmake(InvalidRangeMaxVersionNotGiven)
+
+set(RunCMake_TEST_OPTIONS "-Dversion=three")
+run_cmake(InvalidVersion)
+run_cmake(InvalidMaxVersion)
+unset(RunCMake_TEST_OPTIONS)
+set(RunCMake_TEST_OPTIONS "-Dversion=3.one")
+run_cmake(InvalidVersion)
+run_cmake(InvalidMaxVersion)
+unset(RunCMake_TEST_OPTIONS)
+
+run_cmake(VersionLowerThan2_4)
+run_cmake(MinVersionLargerThanMax)
+run_cmake(VeryHighVersion)