From: abn Date: Tue, 23 May 2017 13:01:59 +0000 (+0200) Subject: Checking at least Python 2.7 X-Git-Tag: V8_4_0a1~41^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fabn%2Fpy_ver_check;p=tools%2Fmedcoupling.git Checking at least Python 2.7 --- 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()