From 713749e0b82988106d8e4d296a87f0594e759ce0 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 31 Mar 2016 15:40:49 +0000 Subject: Unset CGAL_FOUND if CGAL version is less than 4.4 to fix compilation issue with CGAL 4.2. Documentation says CGAL > 4.4 is recommended. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/Doxygen_for_GUDHI_1.3.0@1089 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b20d01d56e080572b067898df94ebe2eebd5893d --- CMakeLists.txt | 5 +++++ src/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cb8b86b..94336e19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,11 @@ else() # or even better https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html # but it implies to use cmake version 3.1 at least. find_package(CGAL) + # Only CGAL versions > 4.4 supports what Gudhi uses from CGAL + if (CGAL_VERSION VERSION_LESS 4.4.0) + message("CGAL version ${CGAL_VERSION} is considered too old to be used by Gudhi.") + unset(CGAL_FOUND) + endif() if(CGAL_FOUND) include( ${CGAL_USE_FILE} ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4abe96d..60315338 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,6 +29,11 @@ else() # or even better https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html # but it implies to use cmake version 3.1 at least. find_package(CGAL) + # Only CGAL versions > 4.4 supports what Gudhi uses from CGAL + if (CGAL_VERSION VERSION_LESS 4.4.0) + message("CGAL version ${CGAL_VERSION} is considered too old to be used by Gudhi.") + unset(CGAL_FOUND) + endif() if(CGAL_FOUND) include( ${CGAL_USE_FILE} ) endif() -- cgit v1.2.3