Revision 6b266e90789290ba5b574d8102e50b2da934f75f authored by Axel Naumann on 29 April 2016, 21:38:38 UTC, committed by Philippe Canal on 29 April 2016, 22:14:00 UTC
A class without user declared constructor still might not have a default consructor.
E.g. a class with a user provided move ctor. Or with a base or member with deleted default ctor.
Just let clang do the right thing.
1 parent 8ea5daa
Raw File
FindOCC.cmake
# - Try to find OpenCASCADE libraries
### Does not test what version has been found,though
### that could be done by parsing Standard_Version.hxx

# Once done, this will define
#  OCC_FOUND - true if OCC has been found
#  OCC_INCLUDE_DIR - the OCC include dir
#  OCC_LIBRARIES (not cached) - full path of OCC libraries

set(_occdirs ${CASROOT} ${CASS_DIR} $ENV{CASROOT} /opt/occ)

find_path(OCC_INCLUDE_DIR
          NAMES Standard_Real.hxx
          HINTS ${_occdirs} /usr/include/opencascade /usr/include/oce
          PATH_SUFFIXES inc
          DOC "Specify the directory containing Standard_Real.hxx")

foreach(_libname ${OCC_FIND_COMPONENTS})
  list(APPEND OCC_REQUIRED_LIBRARIES OCC_${_libname}_LIBRARY)
  find_library(OCC_${_libname}_LIBRARY $
              NAMES ${_libname}
              HINTS ${_occdirs}
              PATH_SUFFIXES lib)
  if(OCC_${_libname}_LIBRARY)
    list(APPEND OCC_LIBRARIES ${OCC_${_libname}_LIBRARY})
  endif()
endforeach()

# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
# all listed variables are TRUE

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OCC DEFAULT_MSG OCC_INCLUDE_DIR ${OCC_REQUIRED_LIBRARIES})
mark_as_advanced(OCC_INCLUDE_DIR ${OCC_REQUIRED_LIBRARIES})
back to top