From: vsr Date: Tue, 26 Feb 2013 16:16:03 +0000 (+0000) Subject: Fix problem with compilation of SALOME on development version - change the way the... X-Git-Tag: V6_main_FINAL~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9386f2d4ad66538ce01ee647f41aba888f7d3150;p=modules%2Fgui.git Fix problem with compilation of SALOME on development version - change the way the development version of OCCT is detected --- diff --git a/adm_local/cmake_files/FindCAS.cmake b/adm_local/cmake_files/FindCAS.cmake index 65e3439a8..884df138c 100644 --- a/adm_local/cmake_files/FindCAS.cmake +++ b/adm_local/cmake_files/FindCAS.cmake @@ -20,16 +20,16 @@ # SET(OCC_VERSION_MAJOR 6) # SET(OCC_VERSION_MINOR 3) # SET(OCC_VERSION_MAINTENANCE 10) -SET(OCC_VERSION_DEVELOPMENT 0) +SET(CAS_VERSION_DEVELOPMENT 0) FIND_FILE(ff Standard_Version.hxx) IF(ff) - FILE(STRINGS ${ff} OCC_VERSION_DEVELOPMENT_STR - REGEX "^ *#define OCC_VERSION_DEVELOPMENT.*$") - IF(OCC_VERSION_DEVELOPMENT_STR) - SET(OCC_VERSION_DEVELOPMENT 1) - ENDIF(OCC_VERSION_DEVELOPMENT_STR) + FILE(STRINGS ${ff} CAS_VERSION_DEVELOPMENT_STR + REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$") + IF(CAS_VERSION_DEVELOPMENT_STR) + SET(CAS_VERSION_DEVELOPMENT 1) + ENDIF(CAS_VERSION_DEVELOPMENT_STR) ENDIF(ff) SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB") @@ -41,6 +41,10 @@ IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64") ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) +IF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DCAS_VERSION_DEVELOPMENT") +ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + IF(NOT WINDOWS) FIND_LIBRARY(CAS_Xmu Xmu) IF(Xmu) diff --git a/adm_local/cmake_files/deprecated/FindCAS.cmake b/adm_local/cmake_files/deprecated/FindCAS.cmake index 4b72de6eb..cb41aacc5 100644 --- a/adm_local/cmake_files/deprecated/FindCAS.cmake +++ b/adm_local/cmake_files/deprecated/FindCAS.cmake @@ -22,15 +22,15 @@ SET(CASROOT $ENV{CASROOT}) # SET(OCC_VERSION_MAJOR 6) # SET(OCC_VERSION_MINOR 3) # SET(OCC_VERSION_MAINTENANCE 10) -SET(OCC_VERSION_DEVELOPMENT 0) +SET(CAS_VERSION_DEVELOPMENT 0) FIND_FILE(ff Standard_Version.hxx ${CASROOT}/include/opencascade ${CASROOT}/inc) IF(ff) - FILE(STRINGS ${ff} OCC_VERSION_DEVELOPMENT_STR - REGEX "^ *#define OCC_VERSION_DEVELOPMENT.*$") - IF(OCC_VERSION_DEVELOPMENT_STR) - SET(OCC_VERSION_DEVELOPMENT 1) - ENDIF(OCC_VERSION_DEVELOPMENT_STR) + FILE(STRINGS ${ff} CAS_VERSION_DEVELOPMENT_STR + REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$") + IF(CAS_VERSION_DEVELOPMENT_STR) + SET(CAS_VERSION_DEVELOPMENT 1) + ENDIF(CAS_VERSION_DEVELOPMENT_STR) ENDIF(ff) SET(CAS_CPPFLAGS) @@ -52,6 +52,10 @@ IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) SET(CAS_CPPFLAGS ${CAS_CPPFLAGS} -D_OCC64) ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) +IF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + SET(CAS_CPPFLAGS "${CAS_CPPFLAGS} -DCAS_VERSION_DEVELOPMENT") +ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1) + IF(NOT WINDOWS) FIND_LIBRARY(Xmu Xmu) IF(Xmu)