Commit a8262e11 authored by Ben Boeckel's avatar Ben Boeckel

SuperbuildMacros: check that superbuild_python_version is available

parent 89476ae8
......@@ -311,6 +311,10 @@ macro (superbuild_add_project_python _name)
set(_superbuild_python_args
"--prefix=bin")
else ()
if (superbuild_build_phase AND NOT superbuild_python_version)
message(FATAL_ERROR
"missing a python version")
endif ()
set(_superbuild_python_args
"--single-version-externally-managed"
"--install-lib=lib/python${superbuild_python_version}/site-packages"
......
......@@ -18,7 +18,8 @@ endif()
superbuild_add_extra_cmake_args(
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE})
set(superbuild_python_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
set(superbuild_python_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
CACHE INTERNAL "")
if (python_FIND_LIBRARIES)
superbuild_add_extra_cmake_args(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment