]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix problem with compilation of SALOME on development version - change the way the...
authorvsr <vsr@opencascade.com>
Tue, 26 Feb 2013 16:16:03 +0000 (16:16 +0000)
committervsr <vsr@opencascade.com>
Tue, 26 Feb 2013 16:16:03 +0000 (16:16 +0000)
adm_local/cmake_files/FindCAS.cmake
adm_local/cmake_files/deprecated/FindCAS.cmake

index 65e3439a8264cefed25088c6468c3bce4b89daf7..884df138ce77e8dadc0b9822ab198b8daf5dc800 100644 (file)
 # 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)
index 4b72de6eb5548911afe046f87748744a8a99c0d6..cb41aacc580c37c06f640c5024b953acd30594ca 100644 (file)
@@ -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)