]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Checking at least Python 2.7 abn/py_ver_check
authorabn <adrien.bruneton@cea.fr>
Tue, 23 May 2017 13:01:59 +0000 (15:01 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 23 May 2017 13:01:59 +0000 (15:01 +0200)
CMakeLists.txt

index a9e362c4a6627b93c235375c7e09e11254f26dbb..51ad2b07e18ead6d968b7cf234af489b230f65d4 100644 (file)
@@ -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()