From 02504e6b4c82e85563b749c7942113ec61827e19 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 13 Jan 2020 15:43:28 +0300 Subject: [PATCH] Fix compilation on Windows with VS 2017 after implementation 64 bit ids in MEDCOUPLING. --- src/MEDCalculator/Swig/CMakeLists.txt | 3 +++ src/MEDCouplingCorba_Swig/CMakeLists.txt | 3 +++ src/MEDCouplingCorba_Swig/Client/CMakeLists.txt | 3 +++ 3 files changed, 9 insertions(+) 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") -- 2.39.2