From: rnv Date: Wed, 16 Oct 2013 14:29:50 +0000 (+0000) Subject: Refactoring of the preprocessor definitions: X-Git-Tag: BR_hydro_v_0_3_1~76 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef7a6e97592a29a6e56986d7679d3b038124739e;p=modules%2Fkernel.git Refactoring of the preprocessor definitions: 1) SIZEOF_FORTRAN_INTEGER anymore is not used. 2) Move SIZEOF_INT and SIZEOF_LONG into the FindOmniOrb.cmake because it needs only for the OmniOrb for WINDOWS platforms. Add d suffix for the OmiOrb libraries in debug for windows. --- diff --git a/salome_adm/cmake_files/FindOmniORB.cmake b/salome_adm/cmake_files/FindOmniORB.cmake index b6680e701..0cff11b99 100644 --- a/salome_adm/cmake_files/FindOmniORB.cmake +++ b/salome_adm/cmake_files/FindOmniORB.cmake @@ -54,13 +54,23 @@ FIND_PATH(OMNIORB_INCLUDE_DIR omniORB4/CORBA.h) ############################################################################## # find libraries ############################################################################## + +# Win release / debug specific stuff: +IF (WIN32) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(OMNIORB_RD_SUFFIX d) + ELSE() + SET(OMNIORB_RD_SUFFIX) + ENDIF() +ENDIF() + IF (WIN32) FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 - NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${CMAKE_STATIC_LIBRARY_SUFFIX}) + NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) FIND_LIBRARY( OMNIORB_LIBRARY_omnithread - NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${CMAKE_STATIC_LIBRARY_SUFFIX}) + NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4 - NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${CMAKE_STATIC_LIBRARY_SUFFIX}) + NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) ELSE (WIN32) FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4) FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread) @@ -71,9 +81,9 @@ ENDIF (WIN32) IF (WIN32) FIND_LIBRARY( OMNIORB_LIBRARY_COS4 - NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${CMAKE_STATIC_LIBRARY_SUFFIX}) + NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4 - NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${CMAKE_STATIC_LIBRARY_SUFFIX}) + NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) ELSE (WIN32) FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4) FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4) @@ -131,7 +141,9 @@ SET(IDL_CLN_H .hh) SET(IDL_SRV_H .hh) SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG") IF(WIN32) - SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__") + ## OmniORB isn`t defines SIZEOF_LONG and SIZEOF_INT on WIN32 platform + ## Note SIZE_OF_LONG calculates in the SalomeSetupPlatform.cmake + SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__ -DSIZEOF_INT=4 -DSIZEOF_LONG=${SIZE_OF_LONG}") ENDIF() IF(APPLE) SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...