summaryrefslogtreecommitdiff
path: root/Tests/FindPython/FindPythonScript.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/FindPython/FindPythonScript.cmake')
-rw-r--r--Tests/FindPython/FindPythonScript.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/FindPython/FindPythonScript.cmake b/Tests/FindPython/FindPythonScript.cmake
index 94500920e..bc7e0d195 100644
--- a/Tests/FindPython/FindPythonScript.cmake
+++ b/Tests/FindPython/FindPythonScript.cmake
@@ -1 +1,9 @@
-find_package(${PYTHON_PACKAGE_NAME} REQUIRED QUIET)
+
+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()