From: mpa Date: Wed, 24 Feb 2016 13:37:09 +0000 (+0300) Subject: Migration to OCCT 7.0 X-Git-Tag: V8_1_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27067646d2204e5d3f7dd7ee3955242fe5cfe934;p=modules%2Fkernel.git Migration to OCCT 7.0 --- diff --git a/salome_adm/cmake_files/FindCAS.cmake b/salome_adm/cmake_files/FindCAS.cmake index 4a1bdee11..ce24f3d58 100644 --- a/salome_adm/cmake_files/FindCAS.cmake +++ b/salome_adm/cmake_files/FindCAS.cmake @@ -18,14 +18,20 @@ # IF(NOT CAS_FIND_QUIETLY) - MESSAGE(STATUS "Looking for OpenCascade (CAS) ...") + MESSAGE(STATUS "Looking for Open CASCADE Technology ...") ENDIF() SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx) # Include directories: -FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc) -FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc) +FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade) +FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade) +IF(CAS_INCLUDE_DIRS) + SET(CAS_UPCOUNT 2) +ELSE() + FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc) + FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc) +ENDIF() MARK_AS_ADVANCED(CAS_VERSION_FILE) SET(CAS_VERSION_DEVELOPMENT 0) @@ -61,8 +67,6 @@ IF(NOT WIN32) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H") ENDIF() -SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DOCC_CONVERT_SIGNALS") - # Test for 64 bit machine: IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64") @@ -76,65 +80,65 @@ IF(NOT WIN32) ENDIF() ENDIF() -FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin ) -FIND_LIBRARY(CAS_TKBin TKBin ) -FIND_LIBRARY(CAS_TKBinL TKBinL ) -FIND_LIBRARY(CAS_TKBinTObj TKBinTObj ) -FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF ) -FIND_LIBRARY(CAS_TKBO TKBO ) -FIND_LIBRARY(CAS_TKBool TKBool ) -FIND_LIBRARY(CAS_TKBRep TKBRep ) -FIND_LIBRARY(CAS_TKCAF TKCAF ) -FIND_LIBRARY(CAS_TKCDF TKCDF ) -FIND_LIBRARY(CAS_TKernel TKernel ) -FIND_LIBRARY(CAS_TKFeat TKFeat ) -FIND_LIBRARY(CAS_TKFillet TKFillet ) -FIND_LIBRARY(CAS_TKG2d TKG2d ) -FIND_LIBRARY(CAS_TKG3d TKG3d ) -FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo ) -FIND_LIBRARY(CAS_TKGeomBase TKGeomBase ) -FIND_LIBRARY(CAS_TKHLR TKHLR ) -FIND_LIBRARY(CAS_TKIGES TKIGES ) -FIND_LIBRARY(CAS_TKLCAF TKLCAF ) -FIND_LIBRARY(CAS_TKMath TKMath ) -FIND_LIBRARY(CAS_TKMesh TKMesh ) -FIND_LIBRARY(CAS_TKMeshVS TKMeshVS ) +FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBin TKBin PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBinL TKBinL PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBinTObj TKBinTObj PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBO TKBO PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBool TKBool PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKBRep TKBRep PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKCAF TKCAF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKCDF TKCDF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKernel TKernel PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKFeat TKFeat PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKFillet TKFillet PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKG2d TKG2d PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKG3d TKG3d PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKGeomBase TKGeomBase PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKHLR TKHLR PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKIGES TKIGES PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKLCAF TKLCAF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKMath TKMath PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKMesh TKMesh PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKMeshVS TKMeshVS PATH_SUFFIXES lib lin64/gcc/lib bin) IF(CAS_VERSION_STR VERSION_LESS "6.9.1") - FIND_LIBRARY(CAS_TKNIS TKNIS ) + FIND_LIBRARY(CAS_TKNIS TKNIS PATH_SUFFIXES lib lin64/gcc/lib bin) ENDIF() -FIND_LIBRARY(CAS_TKOffset TKOffset ) -FIND_LIBRARY(CAS_TKOpenGl TKOpenGl ) -FIND_LIBRARY(CAS_TKPrim TKPrim ) -FIND_LIBRARY(CAS_TKService TKService ) -FIND_LIBRARY(CAS_TKShHealing TKShHealing ) -FIND_LIBRARY(CAS_TKSTEP TKSTEP ) -FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 ) -FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr ) -FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase ) -FIND_LIBRARY(CAS_TKSTL TKSTL ) -FIND_LIBRARY(CAS_TKTObj TKTObj ) -FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo ) -FIND_LIBRARY(CAS_TKV3d TKV3d ) -FIND_LIBRARY(CAS_TKVRML TKVRML ) -FIND_LIBRARY(CAS_TKXCAF TKXCAF ) -FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES ) -FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP ) -FIND_LIBRARY(CAS_TKXMesh TKXMesh ) -FIND_LIBRARY(CAS_TKXml TKXml ) -FIND_LIBRARY(CAS_TKXmlL TKXmlL ) -FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj ) -FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF ) -FIND_LIBRARY(CAS_TKXSBase TKXSBase ) +FIND_LIBRARY(CAS_TKOffset TKOffset PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKOpenGl TKOpenGl PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKPrim TKPrim PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKService TKService PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKShHealing TKShHealing PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKSTEP TKSTEP PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKSTL TKSTL PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKTObj TKTObj PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKV3d TKV3d PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKVRML TKVRML PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXCAF TKXCAF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXMesh TKXMesh PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXml TKXml PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXmlL TKXmlL PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CAS_TKXSBase TKXSBase PATH_SUFFIXES lib lin64/gcc/lib bin) IF(CAS_VERSION_STR VERSION_LESS "7.0") - FIND_LIBRARY(CAS_PTKernel PTKernel ) - FIND_LIBRARY(CAS_TKPCAF TKPCAF ) - FIND_LIBRARY(CAS_TKPLCAF TKPLCAF ) - FIND_LIBRARY(CAS_TKPShape TKPShape ) - FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema ) - FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema ) - FIND_LIBRARY(CAS_TKStdSchema TKStdSchema ) - FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema ) + FIND_LIBRARY(CAS_PTKernel PTKernel PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKPCAF TKPCAF PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKPLCAF TKPLCAF PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKPShape TKPShape PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKStdSchema TKStdSchema PATH_SUFFIXES lib lin64/gcc/lib bin) + FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema PATH_SUFFIXES lib lin64/gcc/lib bin) ENDIF() SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath}) diff --git a/salome_adm/cmake_files/FindSalomeCAS.cmake b/salome_adm/cmake_files/FindSalomeCAS.cmake old mode 100644 new mode 100755 index 2bdfb8b1e..186df6cee --- a/salome_adm/cmake_files/FindSalomeCAS.cmake +++ b/salome_adm/cmake_files/FindSalomeCAS.cmake @@ -38,12 +38,12 @@ MARK_AS_ADVANCED(CAS_INCLUDE_DIRS CAS_TKXmlXCAF CAS_TKXSBase CAS_XCAFPlugin CAS_XmlLPlugin CAS_XmlPlugin CAS_XmlTObjPlugin CAS_XmlXCAFPlugin CAS_Xmu) -IF(CAS_StdLPlugin) - SET(CAS_STDPLUGIN StdPlugin) + +IF(CAS_VERSION_STR VERSION_LESS "7.0") + SET(CAS_STDPLUGIN TKStdSchema) ELSE() - IF(CAS_TKStdSchema) - SET(CAS_STDPLUGIN TKStdSchema) - ENDIF() + SET(CAS_STDPLUGIN TKStd) + SET(CAS_BINPLUGIN TKBin) ENDIF() IF(CAS_FOUND) diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index f78ffe4ac..258173142 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -563,8 +563,13 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount) # Note the double de-reference of "referenceVariable": SET(_tmp_ROOT_DIR "${${referenceVariable}}") ENDIF() - IF(${upCount}) - FOREACH(_unused RANGE 1 ${upCount}) + # Up cound can be reset by detection procedure + SET(_upCount ${upCount}) + IF(DEFINED ${pkg_UC}_UPCOUNT) + SET(_upCount ${${pkg_UC}_UPCOUNT}) + ENDIF() + IF(${_upCount}) + FOREACH(_unused RANGE 1 ${_upCount}) GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH) ENDFOREACH() ENDIF() diff --git a/src/Basics/Basics_OCCTVersion.hxx b/src/Basics/Basics_OCCTVersion.hxx index ce73b22fa..e7ca523c8 100644 --- a/src/Basics/Basics_OCCTVersion.hxx +++ b/src/Basics/Basics_OCCTVersion.hxx @@ -28,6 +28,8 @@ #include +#include + // // NOTE: Since version 6.7.0 OCC_VERSION_DEVELOPMENT macro in the Standard_Version.hxx // points to the development status of the OCCT version: for example "dev", "alpha", @@ -48,4 +50,15 @@ # endif #endif +// temporary code for backward compatibility with OCCT +#if OCC_VERSION_MAJOR < 7 + #define OCCT_DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1) + #define OCCT_IMPLEMENT_STANDARD_RTTIEXT(C1,C2) \ + IMPLEMENT_STANDARD_HANDLE(C1,C2) \ + IMPLEMENT_STANDARD_RTTIEXT(C1,C2) +#else + #define OCCT_DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTIEXT(C1,C2) + #define OCCT_IMPLEMENT_STANDARD_RTTIEXT(C1,C2) IMPLEMENT_STANDARD_RTTIEXT(C1,C2) +#endif + #endif // BASICS_OCCTVERSION_HXX