]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
SALOME 9.1.0 Windows version
authorrnv <rnv@opencascade.com>
Wed, 29 Aug 2018 11:45:48 +0000 (14:45 +0300)
committervsr <vsr@opencascade.com>
Fri, 7 Sep 2018 11:53:23 +0000 (14:53 +0300)
src/MEDCalculator/Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/Client/CMakeLists.txt

index 9e2aa50be6e6fd54c1a6888515af818bcfc70fce..2c6ac1534418114597e710b50fd62495449d8c6f 100644 (file)
@@ -45,11 +45,18 @@ INSTALL(TARGETS medcalculatorspython DESTINATION ${SALOME_INSTALL_LIBS})
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_FLAGS "-py3")
 SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
-SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") 
+  SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
+ELSE()
+  SWIG_ADD_LIBRARY(MEDCalculator LANGUAGE python SOURCES MEDCalculator.i)
+ENDIF()
+
 SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
 
 IF(WIN32)
   SET_TARGET_PROPERTIES(_MEDCalculator PROPERTIES DEBUG_OUTPUT_NAME _MEDCalculator_d)
+  # To increase the size of the .obj file on Windows because MEDLoaderPYTHON_wrap.cxx, generated by SWIG, is too big
+  TARGET_COMPILE_OPTIONS(_MEDCalculator PRIVATE /bigobj) 
 ENDIF(WIN32)
 
 FILE(GLOB medcalculatorspython_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 9a9dfeb74c5d1717605e05cd2ed13bf67dc77871..25d02d8e28489fb65af5755edb4524662f9e0c06 100644 (file)
@@ -48,7 +48,12 @@ SET (SWIG_MODULE_MEDCouplingCorba_EXTRA_DEPS ${MEDCouplingCorba_SWIG_DPYS_FILES}
     ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
     ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
 
-SWIG_ADD_MODULE(MEDCouplingCorba python MEDCouplingCorba.i)
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") 
+  SWIG_ADD_MODULE(MEDCouplingCorba python MEDCouplingCorba.i)
+ELSE()
+  SWIG_ADD_LIBRARY(MEDCouplingCorba LANGUAGE python SOURCES MEDCouplingCorba.i)
+ENDIF()
+
 SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBRARIES} medcouplingcorba ${PLATFORM_LIBS})
 IF(WIN32)
   SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingCorba_d)
index 9bac858be656ba1412848dfe20342386ba199588..fe1d98ea2a4bddcee70343bbad85bd2cee712031 100644 (file)
@@ -37,7 +37,13 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCouplingCorba/Client
   )
 
-SWIG_ADD_MODULE(MEDCouplingClient python MEDCouplingClient.i)
+
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") 
+  SWIG_ADD_MODULE(MEDCouplingClient python MEDCouplingClient.i)
+ELSE()
+  SWIG_ADD_LIBRARY(MEDCouplingClient LANGUAGE python SOURCES MEDCouplingClient.i)
+ENDIF()
+
 SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBRARIES} medcouplingclient)
 IF(WIN32)
   SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingClient_d)