diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp index b89e07452c6..1a2c6bb0cfe 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp @@ -11,10 +11,7 @@ #include "ArrangementPainterOstream.h" #include "ArrangementTypes.h" - -#ifdef CGAL_USE_CORE #include -#endif #include @@ -401,7 +398,6 @@ auto ArrangementPainterOstream>::getPointsList(const X_monotone_curve_2& curve) -> std::vector { -#ifdef CGAL_USE_CORE typedef Curve_renderer_facade Facade; typedef std::pair Coord_2; typedef std::vector Coord_vec_2; @@ -409,9 +405,6 @@ auto ArrangementPainterOstream points; Facade::instance().draw(curve, points); return points; -#else - return {}; -#endif } template @@ -455,13 +448,11 @@ template void ArrangementPainterOstream< CGAL::Arr_algebraic_segment_traits_2>::setupFacade() { -#ifdef CGAL_USE_CORE typedef Curve_renderer_facade Facade; QGraphicsView* view = this->getView(); QRectF viewport = this->viewportRect(); CGAL::Bbox_2 bbox = this->convert(viewport).bbox(); Facade::setup(bbox, view->width(), view->height()); -#endif } // Instantiation of Arr_rational_function_traits_2 diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 980104118fd..58d712712eb 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.1...3.15) project( Arrangement_on_surface_2_Demo ) + set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) if(NOT POLICY CMP0070 AND POLICY CMP0053) # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. @@ -13,7 +15,7 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -find_package(CGAL QUIET COMPONENTS Core Qt5) +find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core) find_package(Qt5 QUIET COMPONENTS Gui Widgets) if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -95,5 +97,18 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(arrangement_2) else() - message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + set(MISSING_DEPS "") + + if(NOT CGAL_FOUND) + set(MISSING_DEPS "CGAL, ${MISSING_DEPS}") + endif() + if(NOT CGAL_Qt5_FOUND) + set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}") + endif() + if(NOT Qt5_FOUND) + set(MISSING_DEPS "Qt5, ${MISSING_DEPS}") + endif() + + message(STATUS + "NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.") endif()