summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0148-Interp-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0148-Libs-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/RunCMakeTest.cmake9
30 files changed, 159 insertions, 0 deletions
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt
new file mode 100644
index 0000000..68b40f7
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0148-Interp-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindPythonInterp\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake
new file mode 100644
index 0000000..ccd04f5
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 NEW)
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(_FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake
new file mode 100644
index 0000000..1879d19
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt
new file mode 100644
index 0000000..2666c22
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0148-Interp-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake b/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake
new file mode 100644
index 0000000..53b60af
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Interp-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindPythonInterp_testing TRUE)
+find_package(PythonInterp MODULE)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt
new file mode 100644
index 0000000..d92b434
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0148-Libs-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindPythonLibs\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake
new file mode 100644
index 0000000..2ef8c46
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 NEW)
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(_FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake
new file mode 100644
index 0000000..06fd6a6
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt
new file mode 100644
index 0000000..5210e51
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0148-Libs-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake b/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake
new file mode 100644
index 0000000..9bbe066
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0148-Libs-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindPythonLibs_testing TRUE)
+find_package(PythonLibs MODULE)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index 26eb908..006757a 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -47,6 +47,12 @@ if(RunCMake_GENERATOR MATCHES "Visual Studio")
run_cmake(CMP0147-WARN)
run_cmake(CMP0147-NEW)
endif()
+run_cmake(CMP0148-Interp-OLD)
+run_cmake(CMP0148-Interp-WARN)
+run_cmake(CMP0148-Interp-NEW)
+run_cmake(CMP0148-Libs-OLD)
+run_cmake(CMP0148-Libs-WARN)
+run_cmake(CMP0148-Libs-NEW)
run_cmake(WrongVersionRange)
run_cmake(EmptyVersionRange)
run_cmake(VersionRangeWithEXACT)
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt
new file mode 100644
index 0000000..8627c2e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0148-Interp-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindPythonInterp
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake b/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake
new file mode 100644
index 0000000..7d73dc4
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(FindPythonInterp)
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt
new file mode 100644
index 0000000..0b0f29d
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindPythonInterp.cmake:[0-9]+ \(message\):
+ The FindPythonInterp module has been removed by policy CMP0148\.
+Call Stack \(most recent call first\):
+ CMP0148-Interp-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake b/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake
new file mode 100644
index 0000000..1f8630e
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
diff --git a/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake b/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake
new file mode 100644
index 0000000..8905221
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonInterp_testing 1)
+include(FindPythonInterp)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt
new file mode 100644
index 0000000..5bd6935
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0148-Interp-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake b/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake
new file mode 100644
index 0000000..18f302d
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Interp-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0148.
+set(_FindPythonInterp_testing 1)
+include(FindPythonInterp)
+
+if(NOT _FindPythonInterp_included)
+ message(FATAL_ERROR "FindPythonInterp.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt
new file mode 100644
index 0000000..4e1f97c
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0148-Libs-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindPythonLibs
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake b/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake
new file mode 100644
index 0000000..c9877bc
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(FindPythonLibs)
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt
new file mode 100644
index 0000000..5f1037d
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindPythonLibs.cmake:[0-9]+ \(message\):
+ The FindPythonLibs module has been removed by policy CMP0148\.
+Call Stack \(most recent call first\):
+ CMP0148-Libs-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake b/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake
new file mode 100644
index 0000000..29b315f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0148 NEW)
+include(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
diff --git a/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake b/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake
new file mode 100644
index 0000000..b69e160
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0148 OLD)
+set(_FindPythonLibs_testing 1)
+include(FindPythonLibs)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt
new file mode 100644
index 0000000..c24abd4
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0148-Libs-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
+ are removed\. Run "cmake --help-policy CMP0148" for policy details\. Use
+ the cmake_policy command to set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake b/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake
new file mode 100644
index 0000000..d8dc00c
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0148-Libs-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0148.
+set(_FindPythonLibs_testing 1)
+include(FindPythonLibs)
+
+if(NOT _FindPythonLibs_included)
+ message(FATAL_ERROR "FindPythonLibs.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake
index b6fdb54..685173e 100644
--- a/Tests/RunCMake/include/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include/RunCMakeTest.cmake
@@ -12,3 +12,12 @@ run_cmake(CMP0146-OLD)
run_cmake(CMP0146-WARN)
run_cmake(CMP0146-NEW-name)
run_cmake(CMP0146-NEW-path)
+
+run_cmake(CMP0148-Interp-OLD)
+run_cmake(CMP0148-Interp-WARN)
+run_cmake(CMP0148-Interp-NEW-name)
+run_cmake(CMP0148-Interp-NEW-path)
+run_cmake(CMP0148-Libs-OLD)
+run_cmake(CMP0148-Libs-WARN)
+run_cmake(CMP0148-Libs-NEW-name)
+run_cmake(CMP0148-Libs-NEW-path)