]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
addition of numpy
authorageay <ageay>
Mon, 8 Jul 2013 10:41:26 +0000 (10:41 +0000)
committerageay <ageay>
Mon, 8 Jul 2013 10:41:26 +0000 (10:41 +0000)
adm_local_without_kernel/cmake_files/FindSalomePython.cmake
src/MEDCalculator/Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCoupling_Swig/CMakeLists.txt

index 754248dcff10f81559e1a8ecba38d88ee6a353b6..bdc75473f25b31bebdf03871af6ce73602e85a0e 100644 (file)
@@ -132,6 +132,19 @@ IF (SALOMEPYTHON_FOUND)
   ENDIF()
 
   # 6. Specifics
+
+  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR ERROR_QUIET )
+  IF(NUMPY_INCLUDE_DIR)
+    SET(NUMPY_FOUND TRUE)
+  ENDIF(NUMPY_INCLUDE_DIR)
+  IF(NUMPY_FOUND)
+    SET(PYTHON_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
+    SET(PYTHON_DEFINITIONS "${PYTHON_DEFINITIONS} -DWITH_NUMPY")
+    MESSAGE(STATUS "numpy found : ${NUMPY_INCLUDE_DIR}")
+  ELSE(NUMPY_FOUND)
+    MESSAGE(STATUS "numpy not found")
+  ENDIF(NUMPY_FOUND)
+
   ## None here    
 ELSE()
   MESSAGE(STATUS "Python was only partially (or not at all) found .")  
index 3634a39e0dafaf0e4f22e294c9d4e602b972479e..33748f178752f807a98045ee31b84b5f1976eca4 100644 (file)
@@ -48,9 +48,9 @@ INSTALL(TARGETS medcalculatorspython DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
   SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
 SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
 SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBS} medcalculator)
 
index 0af175e64506fda6ab46f4a614fbb44c9935834e..0ab95cd7a123e8945c5ac73b53c772ae709f4aa7 100644 (file)
@@ -25,9 +25,9 @@ INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
   SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
 
 SET(MEDCouplingCorba_SWIG_DPYS_FILES
     MEDCouplingCorbaTypemaps.i)
index 8e3e4a74d4ae45e5eb12152d9488d046e151aaa5..0036a2081afff88798d7d0bd4e06b6965130beaf 100644 (file)
@@ -21,9 +21,9 @@ INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
   SET(SWIG_MODULE_MEDCoupling_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
 
 SET (MEDCoupling_SWIG_DPYS_FILES
     MEDCouplingCommon.i