summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FindPython/FindPythonScript.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2025-02-16 17:27:23 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2025-02-28 16:55:24 (GMT)
commitaed9dffdc97afeb20c060d2d5c958f5ad6b0dbc1 (patch)
tree09e84a7a2dffcf7f66287e8fa59b9cff64e17d3d /Tests/RunCMake/FindPython/FindPythonScript.cmake
parent75da788360ca67f752ee70754d310dca52411cf9 (diff)
downloadCMake-aed9dffdc97afeb20c060d2d5c958f5ad6b0dbc1.zip
CMake-aed9dffdc97afeb20c060d2d5c958f5ad6b0dbc1.tar.gz
CMake-aed9dffdc97afeb20c060d2d5c958f5ad6b0dbc1.tar.bz2
FindPython: migrate tests to RunCMake framework
Diffstat (limited to 'Tests/RunCMake/FindPython/FindPythonScript.cmake')
-rw-r--r--Tests/RunCMake/FindPython/FindPythonScript.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPython/FindPythonScript.cmake b/Tests/RunCMake/FindPython/FindPythonScript.cmake
new file mode 100644
index 0000000..fa51f59
--- /dev/null
+++ b/Tests/RunCMake/FindPython/FindPythonScript.cmake
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.15)
+if (PYTHON_MUST_NOT_BE_FOUND)
+ find_package(${PYTHON_PACKAGE_NAME} QUIET)
+ if (${PYTHON_PACKAGE_NAME}_FOUND)
+ message(FATAL_ERROR "${PYTHON_PACKAGE_NAME}: unexpectedly founded.")
+ endif()
+else()
+ find_package(${PYTHON_PACKAGE_NAME} REQUIRED QUIET)
+endif()