diff options
Diffstat (limited to 'Tests/RunCMake/BundleUtilities')
9 files changed, 31 insertions, 0 deletions
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake new file mode 100644 index 0000000..063a7f3 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake @@ -0,0 +1,5 @@ +if(DEFINED CMP0080_VALUE) + cmake_policy(SET CMP0080 ${CMP0080_VALUE}) +endif() + +include(BundleUtilities) diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt new file mode 100644 index 0000000..1454b0c --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\): + BundleUtilities cannot be included at configure time! diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake new file mode 100644 index 0000000..558c16d --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0080 NEW) +include(BundleUtilities) diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake new file mode 100644 index 0000000..a65d92f --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0080 OLD) +include(BundleUtilities) diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt new file mode 100644 index 0000000..a1a0e8f --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt @@ -0,0 +1,4 @@ +CMake Warning \(dev\) at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\): + Policy CMP0080 is not set: BundleUtilities prefers not to be included at + configure time\. Run "cmake --help-policy CMP0080" for policy details\. Use + the cmake_policy command to set the policy and suppress this warning\. diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake b/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake new file mode 100644 index 0000000..45f6f92 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN.cmake @@ -0,0 +1 @@ +include(BundleUtilities) diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt new file mode 100644 index 0000000..6dd8cdf --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.4) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake new file mode 100644 index 0000000..14aaff1 --- /dev/null +++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.4) +include(RunCMake) + +# TODO Migrate Tests/BundleUtilities here + +run_cmake(CMP0080-OLD) +run_cmake(CMP0080-NEW) +run_cmake(CMP0080-WARN) +run_cmake_command(CMP0080-COMMAND-OLD ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=OLD -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) +run_cmake_command(CMP0080-COMMAND-NEW ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=NEW -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) +run_cmake_command(CMP0080-COMMAND-WARN ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake) |