From: rnv Date: Mon, 13 Jan 2020 12:43:28 +0000 (+0300) Subject: Fix compilation on Windows with VS 2017 after implementation 64 bit ids in MEDCOUPLING. X-Git-Tag: V9_5_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Frnv%2Fwinafter_64bit_ids;p=modules%2Fmed.git Fix compilation on Windows with VS 2017 after implementation 64 bit ids in MEDCOUPLING. --- diff --git a/src/MEDCalculator/Swig/CMakeLists.txt b/src/MEDCalculator/Swig/CMakeLists.txt index 28406e855..e9bf4ecbe 100644 --- a/src/MEDCalculator/Swig/CMakeLists.txt +++ b/src/MEDCalculator/Swig/CMakeLists.txt @@ -44,6 +44,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_FLAGS "-py3") +IF(WIN32) + SET_PROPERTY(SOURCE MEDCalculator.i PROPERTY COMPILE_DEFINITIONS WIN32) +ENDIF() SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}") IF(MEDCOUPLING_USE_64BIT_IDS) STRING(APPEND SWIG_MODULE_MEDCalculator_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS") diff --git a/src/MEDCouplingCorba_Swig/CMakeLists.txt b/src/MEDCouplingCorba_Swig/CMakeLists.txt index 570b7648b..eade96ca1 100644 --- a/src/MEDCouplingCorba_Swig/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/CMakeLists.txt @@ -27,6 +27,9 @@ INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_FLAGS "-py3") +IF(WIN32) + SET_PROPERTY(SOURCE MEDCouplingCorba.i PROPERTY COMPILE_DEFINITIONS WIN32) +ENDIF() SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}") IF(MEDCOUPLING_USE_64BIT_IDS) STRING(APPEND SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS") diff --git a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt index fa7f4cf23..19e627185 100644 --- a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt @@ -25,6 +25,9 @@ INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_FLAGS "-py3") +IF(WIN32) + SET_PROPERTY(SOURCE MEDCouplingClient.i PROPERTY COMPILE_DEFINITIONS WIN32) +ENDIF() SET(SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}") IF(MEDCOUPLING_USE_64BIT_IDS) STRING(APPEND SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")