Skip to content
Snippets Groups Projects
Commit f122a40f authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'fix/opencascade-7.8.0' into 'master'

Fix OpenCASCADE 7.8.0 compilation issues

See merge request nektar/nektar!1799
parents 9f4bedba 8db63eec
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ v5.6.0
- Use FwdTrans in UnsteadySystem when using Parareal (!1785)
- Automate deployment of README.md to dockerhub (!1786)
- Fix memory leak with Block preconditioner for time-updated matrices (!1737)
- Fix compilation issue with OpenCASCADE 7.8.0 (!1799)
**CompressibleFlowSolver**
- Complete second Frechet derivative implementation (!1761)
......
......@@ -35,20 +35,28 @@ FIND_PACKAGE(OCE 0.17 QUIET)
SET(OCC_FOUND FALSE)
IF(OCE_FOUND AND OCE_ALL_FOUND)
MESSAGE(STATUS "OpenCASCADE Community Edition has been found with all required components.")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "OpenCASCADE Community Edition has been found with all required components.")
ENDIF()
SET(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
SET(OCC_FOUND TRUE)
ELSE(OCE_FOUND AND OCE_ALL_FOUND) #look for OpenCASCADE
MESSAGE(STATUS "OpenCASCADE Community Edition could not be found or has missing components.")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "OpenCASCADE Community Edition could not be found or has missing components.")
ENDIF()
SET(OpenCASCADE_FIND_COMPONENTS ${OCE_FIND_COMPONENTS})
FIND_PACKAGE(OpenCASCADE)
IF(OpenCASCADE_FOUND)
MESSAGE(STATUS "OpenCASCADE has been found with all required components.")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "OpenCASCADE has been found with all required components.")
ENDIF()
SET(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR})
SET(OCC_FOUND TRUE)
ELSE()
MESSAGE(STATUS "OpenCASCADE could not be found or has missing components.")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "OpenCASCADE could not be found or has missing components.")
ENDIF()
ENDIF()
ENDIF(OCE_FOUND AND OCE_ALL_FOUND)
......@@ -67,10 +75,14 @@ IF(OCC_FOUND)
SET(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
IF(OCC_VERSION_STRING VERSION_LESS 6.8)
MESSAGE(STATUS "OCC version too low, will build from source")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "OCC version too low, will build from source")
ENDIF()
SET(OCC_FOUND FALSE)
ELSE()
MESSAGE(STATUS "-- Found OCE/OpenCASCADE with OCC version: ${OCC_VERSION_STRING}")
IF (NOT FIND_OCC_QUIET)
MESSAGE(STATUS "-- Found OCE/OpenCASCADE with OCC version: ${OCC_VERSION_STRING}")
ENDIF()
SET(OCC_LIBRARIES ${OCE_FIND_COMPONENTS})
ENDIF()
ENDIF(OCC_FOUND)
......@@ -15,8 +15,6 @@ IF(NEKTAR_USE_MESHGEN)
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBool
......@@ -27,21 +25,32 @@ IF(NEKTAR_USE_MESHGEN)
TKGeomBase
TKOffset
TKPrim
TKSTEP
TKSTEPBase
TKSTEPAttr
TKHLR
TKFeat
TKXCAF
TKLCAF
TKXDESTEP
)
)
# Try to find installed version of OpenCascade
SET(FIND_OCC_QUIET ON)
INCLUDE(FindOCC)
# Determine which version of OpenCASCADE we're building against. 7.8.0
# renames some of the libraries and we therefore need to re-run detection
# with the correct packages.
IF (OCC_FOUND)
# We definitiely don't need to build OCE in this case.
SET(BUILD_OCE OFF)
IF (OCC_VERSION_STRING VERSION_LESS 7.8.0)
LIST(APPEND OCC_LIB_LIST TKIGES TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKXDESTEP TKSTL TKSTEPAttr)
ELSE()
LIST(APPEND OCC_LIB_LIST TKDESTEP TKDEIGES TKDESTL)
ENDIF()
# Re-run to find additional components for STEP.
SET(FIND_OCC_QUIET OFF)
INCLUDE(FindOCC)
ELSE()
SET(BUILD_OCE ON)
ENDIF()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment