IF(SALOME_MED_ENABLE_PYTHON)
FIND_PACKAGE(SalomePythonInterp)
FIND_PACKAGE(SalomePythonLibs)
+ FIND_PACKAGE(SalomeNumPySciPy)
FIND_PACKAGE(SalomeSWIG)
SALOME_LOG_OPTIONAL_PACKAGE(PythonInterp SALOME_MED_ENABLE_PYTHON)
SALOME_LOG_OPTIONAL_PACKAGE(PythonLibs SALOME_MED_ENABLE_PYTHON)
SALOME_LOG_OPTIONAL_PACKAGE(SWIG SALOME_MED_ENABLE_PYTHON)
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
- # Set the extra flags for SWIG for numpy and scipy
- SET(SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY)
- IF(NUMPY_FOUND)
- SET(SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY "-DWITH_NUMPY")
- ENDIF(NUMPY_FOUND)
- IF(SCIPY_FOUND)
- SET(SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY "${SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY};-DWITH_SCIPY")
- ENDIF(SCIPY_FOUND)
ENDIF(SALOME_MED_ENABLE_PYTHON)
IF(SALOME_BUILD_TESTS)
#
# Author : Anthony Geay (CEA/DEN)
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
+ ${NUMPY_INCLUDE_DIR}
${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${MEDCOUPLING_INCLUDE_DIRS}
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS ${SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY})
+SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
ADD_SUBDIRECTORY(Client)
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS ${SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY})
+SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
SET(MEDCouplingCorba_SWIG_DPYS_FILES
MEDCouplingCorbaTypemaps.i)
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
+ ${NUMPY_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/../../idl
#
# Author : Anthony Geay (CEA/DEN)
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS ${SWIG_EXTRA_FLAGS_FOR_NUMPYANDSCIPY})
+SET(SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
+ ${NUMPY_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/../../../idl