CGAL is REQUIRED in find_package: no need to test CGAL_FOUND

As CGAL is `REQUIRED` in `find_package`, no test of `CGAL_FOUND` can
be done, if `CGAL_FOUND` is not `TRUE`, then CMake stops with a hard
error at the line `find_package(CGAL REQUIRED ...)`.
This commit is contained in:
Laurent Rineau 2019-05-07 11:21:12 +02:00
parent e77f3e5d1c
commit af16025ce0
1 changed files with 5 additions and 15 deletions

View File

@ -157,23 +157,13 @@ EOF
IFS=$OLDIFS
fi
echo "find_package( CGAL QUIET COMPONENTS ${CGAL_COMPONENTS//:/ } )"
if [ -n "${CGAL_COMPONENTS}" ]; then
echo "find_package( CGAL REQUIRED OPTIONAL_COMPONENTS ${CGAL_COMPONENTS//:/ } )"
else
echo "find_package( CGAL REQUIRED )"
fi
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
if ( NOT CGAL_FOUND )
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
EOF
#---------------------------------------------------------------------------
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cat << 'EOF'
# Boost and its components