]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[EDF31196] : ooops
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 18 Oct 2024 14:29:11 +0000 (16:29 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 18 Oct 2024 14:29:11 +0000 (16:29 +0200)
src/MEDCoupling_Swig/CMakeLists.txt

index 1e26d4dcd35e4ea29af85112eca8d283354aaa6b..cd8a4fefe92e8c399159e2e2ffec7a7ca7c2c5a9 100644 (file)
@@ -133,15 +133,15 @@ SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON)
 IF(WIN32)
   SET_PROPERTY(SOURCE MEDCouplingRemapper.i PROPERTY COMPILE_DEFINITIONS WIN32)
 ENDIF()
-#IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
-#  SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_FLAGS "-py3")
-#ELSE()
-#  SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-#ENDIF()
-#SET(SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
-#IF(MEDCOUPLING_USE_64BIT_IDS)
-#  STRING(APPEND SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
-#ENDIF(MEDCOUPLING_USE_64BIT_IDS)
+IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+  SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_FLAGS "-py3")
+ELSE()
+  SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+ENDIF()
+SET(SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 # _ABR_ Ensure dependency mechanism on all SWIG files and headers
 SET (SWIG_MODULE_MEDCouplingRemapper_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES}
@@ -149,27 +149,26 @@ SET (SWIG_MODULE_MEDCouplingRemapper_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES}
     ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
 
 
-#IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") 
-#  SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)  
-#ELSE()
-#  SWIG_ADD_LIBRARY(MEDCouplingRemapper LANGUAGE python SOURCES MEDCouplingRemapper.i)
-#ENDIF()
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") 
+  SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)  
+ELSE()
+  SWIG_ADD_LIBRARY(MEDCouplingRemapper LANGUAGE python SOURCES MEDCouplingRemapper.i)
+ENDIF()
 
-#IF(WIN32 OR CYGWIN)
-#  SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
-#ELSE(WIN32 OR CYGWIN)
-#  # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
-#  SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper)
-#ENDIF(WIN32 OR CYGWIN)
+IF(WIN32 OR CYGWIN)
+  SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
+ELSE(WIN32 OR CYGWIN)
+  # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+  SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper)
+ENDIF(WIN32 OR CYGWIN)
 
 IF(WIN32)
   SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
   SET_TARGET_PROPERTIES(_${MEDCouling_target_name} PROPERTIES DEBUG_OUTPUT_NAME _${MEDCouling_target_name}_d)
 ENDIF(WIN32)
-INSTALL(TARGETS ${SWIG_MODULE_${MEDCouling_target_name}_REAL_NAME} DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
-#INSTALL(TARGETS ${SWIG_MODULE_${MEDCouling_target_name}_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
+INSTALL(TARGETS ${SWIG_MODULE_${MEDCouling_target_name}_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
 
-#SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py)
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py)
 IF(WIN32)
   SET(PYFILES_TO_INSTALL ${PYFILES_TO_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCompat.py)
 ELSE()