Skip to content

Commit

Permalink
Merge pull request #84 from dzenanz/master
Browse files Browse the repository at this point in the history
COMP: fix CMake configure error when Python is not found
  • Loading branch information
thewtex authored Dec 14, 2018
2 parents e5f6d08 + 5e3f64b commit 34f9a1b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ endif()

if(BUILD_DOCUMENTATION)
find_package(PythonInterp REQUIRED)

# Set here the proper version of Python required to be able to build
# tarballs for each example
set(PYTHON_REQUIRED_VERSION 2.7)
if(${PYTHON_VERSION_STRING} VERSION_LESS ${PYTHON_REQUIRED_VERSION})
message(SEND_ERROR "Building the documentation requires Python >= ${PYTHON_REQUIRED_VERSION}")
if(NOT PYTHONINTERP_FOUND)
message(SEND_ERROR "Building the documentation requires Python")
else()
# Set here the proper version of Python required to be able to build
# tarballs for each example
set(PYTHON_REQUIRED_VERSION 2.7)
if(${PYTHON_VERSION_STRING} VERSION_LESS ${PYTHON_REQUIRED_VERSION})
message(SEND_ERROR "Building the documentation requires Python >= ${PYTHON_REQUIRED_VERSION}")
endif()
endif()
endif()

Expand Down

0 comments on commit 34f9a1b

Please sign in to comment.