Skip to content
Snippets Groups Projects
Commit 60bb654c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

add more info in warning msg

parent cb02e5b7
No related branches found
No related tags found
1 merge request!9OpenCascade configuration :
Pipeline #
......@@ -1090,10 +1090,8 @@ if(HAVE_SOLVER)
endif(HAVE_SOLVER)
if(ENABLE_OCC)
set(OCC_VERSION "")
set(OCC_MINIMAL_VERSION "6.9.1")
if(WIN32 OR CYGWIN)
if(HAVE_64BIT_SIZE_T)
set(OCC_SYS_NAME win64)
......@@ -1103,31 +1101,26 @@ if(ENABLE_OCC)
else(WIN32 OR CYGWIN)
set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
endif(WIN32 OR CYGWIN)
find_path(OCC_INC "Standard_Version.hxx" HINTS ENV CASROOT PATH_SUFFIXES inc
include include/oce opencascade include/opencascade)
if(OCC_INC)
file(STRINGS ${OCC_INC}/Standard_Version.hxx OCC_MAJOR REGEX "#define OCC_VERSION_MAJOR.*")
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MAJOR REGEX "#define OCC_VERSION_MAJOR.*")
string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR})
file(STRINGS ${OCC_INC}/Standard_Version.hxx OCC_MINOR REGEX "#define OCC_VERSION_MINOR.*")
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MINOR REGEX "#define OCC_VERSION_MINOR.*")
string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR})
file(STRINGS ${OCC_INC}/Standard_Version.hxx OCC_MAINT REGEX "#define OCC_VERSION_MAINTENANCE.*")
file(STRINGS ${OCC_INC}/Standard_Version.hxx
OCC_MAINT REGEX "#define OCC_VERSION_MAINTENANCE.*")
string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT})
set(OCC_VERSION "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}")
message(STATUS "Found OpenCascade version ${OCC_VERSION} in ${OCC_INC}")
message(STATUS "Found OpenCASCADE version ${OCC_VERSION} in ${OCC_INC}")
endif(OCC_INC)
if(OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
message(WARNING "Recent version of OpenCascade (>= ${OCC_MINIMAL_VERSION}) is required")
message(WARNING "Installation directory of OpenCascade can be specified in environment variable CASROOT")
message(WARNING "Gmsh requires OpenCASCADE >= ${OCC_MINIMAL_VERSION}")
message(WARNING "Use CMAKE_PREFIX_PATH or the CASROOT environment variable "
"to explicitely specify the installation path of OpenCASCADE")
else (OCC_VERSION STRLESS ${OCC_MINIMAL_VERSION})
set(OCC_LIBS_REQUIRED
# subset of DataExchange
TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase
......@@ -1140,7 +1133,6 @@ if(ENABLE_OCC)
# TKAdvTools -- not necessary? (and removed from OCC 6.8)
TKMath TKernel)
list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED)
if(OCC_LIBS)
message(STATUS "OCC libraries specified explicitly: " ${OCC_LIBS})
list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS)
......@@ -1157,9 +1149,8 @@ if(ENABLE_OCC)
endforeach(OCC)
list(LENGTH OCC_LIBS NUM_OCC_LIBS)
endif(OCC_LIBS)
if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
set_config_option(HAVE_OCC "OpenCascade")
set_config_option(HAVE_OCC "OpenCASCADE")
list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
list(APPEND EXTERNAL_INCLUDES ${OCC_INC})
if(HAVE_64BIT_SIZE_T)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment