From 8d2a9d52253ac0b4569d8f6c2e2a821fddca5b3a Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 16 Oct 2013 14:29:08 +0000 Subject: [PATCH] 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. --- CMakeLists.txt | 4 ---- salome_adm/cmake_files/SalomeSetupPlatform.cmake | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 796934552..ed390c814 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,10 +49,6 @@ SET(BUILD_SHARED_LIBS TRUE) SET(CALCIUM_IDL_INT_F77 long) SET(CALCIUM_CORBA_INT_F77 CORBA::Long) SET(LONG_OR_INT int) -# Global definitions -ADD_DEFINITIONS(-DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_INT=4) -## OmniORB already defines SIZEOF_LONG -# ADD_DEFINITIONS(-DSIZEOF_LONG=${SIZE_OF_LONG}) # User options # ============ diff --git a/salome_adm/cmake_files/SalomeSetupPlatform.cmake b/salome_adm/cmake_files/SalomeSetupPlatform.cmake index 20c9b3036..226f38c7d 100644 --- a/salome_adm/cmake_files/SalomeSetupPlatform.cmake +++ b/salome_adm/cmake_files/SalomeSetupPlatform.cmake @@ -82,7 +82,6 @@ ENDIF() # ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) #ENDIF() - IF(WIN32) ## Windows specific: ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... @@ -98,7 +97,9 @@ IF(WIN32) IF(MACHINE_IS_64) ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0) ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators - SET(SIZE_OF_LONG "4") # set sizeof(long) to 4 byte + SET(SIZE_OF_LONG 4) # set sizeof(long) to 4 byte + ELSE() + SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P}) # set sizeof(long) the same as size of pointers ENDIF() ELSE() ## Linux specific: -- 2.39.2