${CMAKE_CURRENT_SOURCE_DIR}/../RENUMBER_Swig
${CMAKE_CURRENT_SOURCE_DIR}/../MEDPartitioner
${CMAKE_CURRENT_SOURCE_DIR}/../MEDPartitioner_Swig
+ ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo
+ ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM
+ ${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM_Swig
${PROJECT_BINARY_DIR}/doc
)
IF(NOT MEDCOUPLING_MICROMED)
LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_MED_FILE)
LIST(APPEND medcoupling_LIB_dependancies medloader)
-ENDIF(NOT MEDCOUPLING_MICROMED)
-IF(MEDCOUPLING_ENABLE_RENUMBER)
- LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_RENUMBER)
- LIST(APPEND medcoupling_LIB_dependancies renumbercpp)
-ENDIF(MEDCOUPLING_ENABLE_RENUMBER)
+ IF(MEDCOUPLING_ENABLE_RENUMBER)
+ LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_RENUMBER)
+ LIST(APPEND medcoupling_LIB_dependancies renumbercpp)
+ ENDIF(MEDCOUPLING_ENABLE_RENUMBER)
+
+ IF(MEDCOUPLING_ENABLE_PARTITIONER)
+ LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_PARTITIONER)
+ LIST(APPEND medcoupling_LIB_dependancies medpartitionercpp)
+ ENDIF(MEDCOUPLING_ENABLE_PARTITIONER)
+ENDIF(NOT MEDCOUPLING_MICROMED)
-IF(MEDCOUPLING_ENABLE_PARTITIONER)
- LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_PARTITIONER)
- LIST(APPEND medcoupling_LIB_dependancies medpartitionercpp)
-ENDIF(MEDCOUPLING_ENABLE_PARTITIONER)
+IF(MEDCOUPLING_USE_MPI)
+ INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${MPI_DEFINITIONS})
+ LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_PARALLEL_INTERPOLATOR)
+ LIST(APPEND medcoupling_LIB_dependancies paramedmem)
+ENDIF(MEDCOUPLING_USE_MPI)
SWIG_ADD_MODULE(medcoupling python medcoupling.i)
SWIG_LINK_LIBRARIES(medcoupling ${medcoupling_LIB_dependancies})
INSTALL(TARGETS _medcoupling DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
INSTALL(FILES medcoupling.i medcoupling_pycode DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/medcoupling.py ${MEDCOUPLING_INSTALL_PYTHON})
+
+INCLUDE(tests.set)
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+
+FOREACH(test ${BASE_TESTS})
+ GET_FILENAME_COMPONENT(testname ${test} NAME_WE)
+ ADD_TEST(NAME ${testname} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${test})
+ SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
+ENDFOREACH()
+
+SET(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/PyWrapping)
+
+INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} RENAME CTestTestfile.cmake)
+INSTALL(FILES ${BASE_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY})
+INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})