diff --git a/CMakeLists.txt b/CMakeLists.txt index d835ec6..017b785 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,13 +66,15 @@ include_directories(${Boost_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/plog) +set(python_version_required 3.8) + if(NOT PYTHON_EXECUTABLE) if(BUILD_NEW_GENERATORS OR Testing OR Document) if(${CMAKE_VERSION} VERSION_LESS 3.12) - find_package(PythonInterp 3.6 REQUIRED) + find_package(PythonInterp ${python_version_required} REQUIRED) set(python_version_mm "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") else(${CMAKE_VERSION} VERSION_LESS 3.12) - find_package(Python3 3.6 COMPONENTS Interpreter REQUIRED) + find_package(Python3 ${python_version_required} COMPONENTS Interpreter REQUIRED) set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) set(python_version_mm "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}") endif(${CMAKE_VERSION} VERSION_LESS 3.12) @@ -87,8 +89,8 @@ else() message(STATUS "Given Python interpreter: ${PYTHON_EXECUTABLE}") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" result "${result}") message(STATUS "Python version: ${result}") - if("${result}" VERSION_LESS 3.6) - message(FATAL_ERROR "Python ${result} is not supported (3.6 or later is required)") + if("${result}" VERSION_LESS ${python_version_required}) + message(FATAL_ERROR "Python ${result} is not supported (${python_version_required} or later is required)") endif() string(REPLACE "." ";" result "${result}") set(result "${result}")