From: ana Date: Thu, 20 Sep 2012 11:07:08 +0000 (+0000) Subject: Solve problem of using MIN/MAX macros on windows. X-Git-Tag: V6_main_FINAL~484 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f52a2c2f3bf2b8c4556a661d2bce2676f529da23;p=tools%2Fmedcoupling.git Solve problem of using MIN/MAX macros on windows. --- diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index 322042e73..80cdb8d72 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -35,12 +35,6 @@ #include #include -#ifdef WIN32 - #ifdef min - #undef min - #endif -#endif - namespace INTERP_KERNEL { template diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx index a16a117d3..79d6fa07a 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx @@ -28,16 +28,6 @@ #include -#ifdef WIN32 - #ifdef max - #undef max - #endif - - #ifdef min - #undef min - #endif -#endif - namespace ParaMEDMEM { class DataArrayDouble; diff --git a/src/MEDOP/cmp/CMakeLists.txt b/src/MEDOP/cmp/CMakeLists.txt index 7d5cc811b..165ca2d82 100644 --- a/src/MEDOP/cmp/CMakeLists.txt +++ b/src/MEDOP/cmp/CMakeLists.txt @@ -55,9 +55,14 @@ SET(COMMON_LIBS ${OMNIORB_LIBS} ${PLATFORM_LIBS} ) +SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}") +# This undefines the macros MIN and MAX which are specified in the windows headers +IF(WINDOWS) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOMINMAX") +ENDIF(WINDOWS) ADD_LIBRARY(MEDOPFactoryEngine SHARED ${MEDOPFactoryEngine_SOURCES}) -SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}") +SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") TARGET_LINK_LIBRARIES(MEDOPFactoryEngine SalomeIDLMED ${COMMON_LIBS}) INSTALL(TARGETS MEDOPFactoryEngine DESTINATION ${MED_salomelib_LIBS})