From: rnv Date: Wed, 29 Aug 2018 11:45:48 +0000 (+0300) Subject: SALOME 9.1.0 Windows version X-Git-Tag: V9_1_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d6f699a5a715b86fb4a94cd9ce98173516734d39;p=modules%2Fmed.git SALOME 9.1.0 Windows version --- diff --git a/src/MEDCalculator/Swig/CMakeLists.txt b/src/MEDCalculator/Swig/CMakeLists.txt index 9e2aa50be..2c6ac1534 100644 --- a/src/MEDCalculator/Swig/CMakeLists.txt +++ b/src/MEDCalculator/Swig/CMakeLists.txt @@ -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") diff --git a/src/MEDCouplingCorba_Swig/CMakeLists.txt b/src/MEDCouplingCorba_Swig/CMakeLists.txt index 9a9dfeb74..25d02d8e2 100644 --- a/src/MEDCouplingCorba_Swig/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/CMakeLists.txt @@ -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) diff --git a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt index 9bac858be..fe1d98ea2 100644 --- a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt @@ -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)