- SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
- SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
- SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS}")
-
- IF(SALOME_MED_PARTITIONER_PARMETIS)
- #FIND_PACKAGE(SalomeParMetis)
- FIND_PACKAGE(ParMetis)
- #SALOME_LOG_OPTIONAL_PACKAGE(ParMetis SALOME_MED_PARTITIONER_PARMETIS)
- ADD_DEFINITIONS("-DMED_ENABLE_PARMETIS")
- ENDIF(SALOME_MED_PARTITIONER_PARMETIS)
-ENDIF(SALOME_USE_MPI)
-
-IF(SALOME_MED_ENABLE_RENUMBER)
- #FIND_PACKAGE(SalomeBoost)
- #SALOME_LOG_OPTIONAL_PACKAGE(Boost SALOME_MED_ENABLE_RENUMBER)
- IF(DEFINED ENV{BOOST_ROOT_DIR})
- SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the Boost.")
- LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}")
+ IF(MEDCOUPLING_PARTITIONER_PARMETIS)
+ FIND_PACKAGE(SalomeParMetis)
+ SALOME_LOG_OPTIONAL_PACKAGE(ParMetis MEDCOUPLING_PARTITIONER_PARMETIS)
+ IF (SalomeParMetis_FOUND)
+ ADD_DEFINITIONS("-DMED_ENABLE_PARMETIS")
+ ENDIF()
+ ENDIF(MEDCOUPLING_PARTITIONER_PARMETIS)
+ IF(MEDCOUPLING_PARTITIONER_PTSCOTCH)
+ FIND_PACKAGE(SalomePTScotch)
+ SALOME_LOG_OPTIONAL_PACKAGE(PTScotch MEDCOUPLING_PARTITIONER_PTSCOTCH)
+ IF(SalomePTScotch_FOUND)
+ ADD_DEFINITIONS("-DMED_ENABLE_PTSCOTCH")
+ ENDIF(SalomePTScotch_FOUND)
+ ENDIF(MEDCOUPLING_PARTITIONER_PTSCOTCH)
+ENDIF(MEDCOUPLING_USE_MPI)
+
+IF(MEDCOUPLING_ENABLE_RENUMBER)
+ FIND_PACKAGE(SalomeBoost)
+ SALOME_LOG_OPTIONAL_PACKAGE(Boost MEDCOUPLING_ENABLE_RENUMBER)
+ENDIF(MEDCOUPLING_ENABLE_RENUMBER)
+
+IF(MEDCOUPLING_ENABLE_PYTHON)
+ FIND_PACKAGE(SalomePythonInterp)
+ FIND_PACKAGE(SalomePythonLibs)
+ FIND_PACKAGE(SalomeNumPySciPy)
+ FIND_PACKAGE(SalomeSWIG)
+ 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()