From d6e51760d0736338c2e51308a8268eaa4b3e83bf Mon Sep 17 00:00:00 2001 From: abn Date: Tue, 23 May 2017 15:01:59 +0200 Subject: [PATCH] Checking at least Python 2.7 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9e362c4a..51ad2b07e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,11 @@ IF(MEDCOUPLING_ENABLE_PYTHON) SALOME_LOG_OPTIONAL_PACKAGE(PythonInterp MEDCOUPLING_ENABLE_PYTHON) SALOME_LOG_OPTIONAL_PACKAGE(PythonLibs MEDCOUPLING_ENABLE_PYTHON) SALOME_LOG_OPTIONAL_PACKAGE(SWIG MEDCOUPLING_ENABLE_PYTHON) + IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "2") + IF("${PYTHON_VERSION_MINOR}" LESS "7") + MESSAGE(FATAL_ERROR "MEDCoupling's Python requires at least Python 2.7 (you seem to have ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}). Upgrade your Python, or turn off MEDCOUPLING_ENABLE_PYTHON") + ENDIF() + ENDIF() IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3") MESSAGE(STATUS "Using Python 3") ENDIF() -- 2.39.2