diff options
author | Brad King <brad.king@kitware.com> | 2020-04-23 13:15:10 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-23 09:15:24 -0400 |
commit | 61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542 (patch) | |
tree | 1aa5e94ee8bbb094e22cc6bd4359443fec07fc93 /Tests | |
parent | b779cb13b4462ad3245a442bb7c8fcd70e3faac6 (diff) | |
parent | 306a1ba96073175ddc0c4de4d5f17b44d432da33 (diff) | |
download | cmake-61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542.tar.gz |
Merge topic 'remove-documentation-module'
306a1ba960 Modules/Documentation: remove
ad4487a96a cmIncludeCommand: add infrastructure for deprecated modules
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4617
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-Common.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-NEW.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-OLD.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt | 8 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt | 37 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMP0106-WARN.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/RunCMakeTest.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0106/subdir/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 |
15 files changed, 110 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0106/CMP0106-Common.cmake b/Tests/RunCMake/CMP0106/CMP0106-Common.cmake new file mode 100644 index 0000000000..a1f7908f39 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-Common.cmake @@ -0,0 +1,10 @@ +include(Documentation OPTIONAL RESULT_VARIABLE found) +if (NOT should_find AND found) + message(FATAL_ERROR + "The Documentation module should not have been found, but it was.") +endif () +if (should_find AND NOT found) + message(FATAL_ERROR + "The Documentation module should have been found, but it was not.") +endif () +include(${CMAKE_ROOT}/Modules/Documentation.cmake) diff --git a/Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt b/Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt new file mode 100644 index 0000000000..7ad774e96c --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at .*/Modules/Documentation.cmake:15 \(message\): + Documentation.cmake is VTK-specific code and should not be used in non-VTK + projects. This logic in this module is best shipped with the project using + it rather than with CMake. This is now an error according to policy + CMP0106. +Call Stack \(most recent call first\): + CMP0106-Common.cmake:10 \(include\) + CMP0106-NEW.cmake:4 \(include\) + CMakeLists.txt:7 \(include\) diff --git a/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake b/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake new file mode 100644 index 0000000000..e7d5bd1202 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0106 NEW) + +set(should_find OFF) +include(CMP0106-Common.cmake) diff --git a/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake b/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake new file mode 100644 index 0000000000..730e8467f4 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake @@ -0,0 +1,9 @@ +cmake_policy(SET CMP0106 OLD) + +set(should_find ON) +include(CMP0106-Common.cmake) +if (NOT DEFINED BUILD_DOCUMENTATION) + message(FATAL_ERROR + "Cache variables seem to have not been made with a `OLD` policy " + "setting.") +endif () diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt new file mode 100644 index 0000000000..b61889b384 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt @@ -0,0 +1,8 @@ +CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\): + Policy CMP0106 is not set: The Documentation module is removed. Run "cmake + --help-policy CMP0106" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + +Call Stack \(most recent call first\): + subdir/CMakeLists.txt:2 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake new file mode 100644 index 0000000000..309abcc51c --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake @@ -0,0 +1,2 @@ +set(should_find ON) +add_subdirectory(subdir) diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt new file mode 100644 index 0000000000..f8a754eb26 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt @@ -0,0 +1,9 @@ +CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\): + Policy CMP0106 is not set: The Documentation module is removed. Run "cmake + --help-policy CMP0106" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + +Call Stack \(most recent call first\): + CMP0106-WARN-VTK.cmake:2 \(include\) + CMakeLists.txt:7 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake new file mode 100644 index 0000000000..99f6c396cb --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake @@ -0,0 +1,2 @@ +set(should_find ON) +include(CMP0106-Common.cmake) diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt new file mode 100644 index 0000000000..d0d48d0b12 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt @@ -0,0 +1,37 @@ +CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\): + Policy CMP0106 is not set: The Documentation module is removed. Run "cmake + --help-policy CMP0106" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + +Call Stack \(most recent call first\): + CMP0106-WARN.cmake:2 \(include\) + CMakeLists.txt:7 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning \(dev\) at .*/Modules/Documentation.cmake:27 \(message\): + Policy CMP0106 is not set: The Documentation module is removed. Run "cmake + --help-policy CMP0106" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + + Documentation.cmake is VTK-specific code and should not be used in non-VTK + projects. This logic in this module is best shipped with the project using + it rather than with CMake. +Call Stack \(most recent call first\): + CMP0106-Common.cmake:1 \(include\) + CMP0106-WARN.cmake:2 \(include\) + CMakeLists.txt:7 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning \(dev\) at .*/Modules/Documentation.cmake:27 \(message\): + Policy CMP0106 is not set: The Documentation module is removed. Run "cmake + --help-policy CMP0106" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + + Documentation.cmake is VTK-specific code and should not be used in non-VTK + projects. This logic in this module is best shipped with the project using + it rather than with CMake. +Call Stack \(most recent call first\): + CMP0106-Common.cmake:10 \(include\) + CMP0106-WARN.cmake:2 \(include\) + CMakeLists.txt:7 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake new file mode 100644 index 0000000000..99f6c396cb --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake @@ -0,0 +1,2 @@ +set(should_find ON) +include(CMP0106-Common.cmake) diff --git a/Tests/RunCMake/CMP0106/CMakeLists.txt b/Tests/RunCMake/CMP0106/CMakeLists.txt new file mode 100644 index 0000000000..eafa642358 --- /dev/null +++ b/Tests/RunCMake/CMP0106/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +if (RunCMake_TEST STREQUAL "CMP0106-WARN-VTK") + project(VTK NONE) +else () + project(${RunCMake_TEST} NONE) +endif () +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0106/RunCMakeTest.cmake b/Tests/RunCMake/CMP0106/RunCMakeTest.cmake new file mode 100644 index 0000000000..acec054261 --- /dev/null +++ b/Tests/RunCMake/CMP0106/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +run_cmake(CMP0106-OLD) +run_cmake(CMP0106-NEW) +run_cmake(CMP0106-WARN) +run_cmake(CMP0106-WARN-VTK) +run_cmake(CMP0106-WARN-ParaView) diff --git a/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt b/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt new file mode 100644 index 0000000000..ed1dd055d3 --- /dev/null +++ b/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +project(VTK NONE) +include(${CMAKE_CURRENT_SOURCE_DIR}/../CMP0106-Common.cmake) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index f5472d92cd..cc888682f7 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -119,6 +119,7 @@ add_RunCMake_test(CMP0102) if(CMake_TEST_CUDA) add_RunCMake_test(CMP0104) endif() +add_RunCMake_test(CMP0106) # The test for Policy 65 requires the use of the # CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode |