summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-08-04 15:41:38 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-08-04 15:41:38 +0000
commitc4f7417b79dfe7610a9e7b5ffbf487abfe7fa3a0 (patch)
tree39ea60d6613c56dd81f5d05869ab2a630ae786f9
parentd5c5c59161b724f93999c78d979c555b9a72d1ec (diff)
Make GUDHI Cmake less verbose on CGAL package finding
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1415 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2eebce43b0f75ab1cef3a2fe6f2c1bd0b38672a9
-rw-r--r--data/points/generator/CMakeLists.txt8
-rw-r--r--src/Alpha_complex/example/CMakeLists.txt10
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Persistent_cohomology/example/CMakeLists.txt11
-rw-r--r--src/Witness_complex/example/CMakeLists.txt8
-rw-r--r--src/common/example/CMakeLists.txt8
6 files changed, 16 insertions, 37 deletions
diff --git a/data/points/generator/CMakeLists.txt b/data/points/generator/CMakeLists.txt
index e29eb19c..f559610c 100644
--- a/data/points/generator/CMakeLists.txt
+++ b/data/points/generator/CMakeLists.txt
@@ -13,8 +13,6 @@ if(CGAL_FOUND)
# on cube is not available in CGAL
add_test(hypergenerator_in_cube_7000_12_10.8 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator in cube inCube.off 7000 12 10.8)
add_test(hypergenerator_in_cube_50000_2 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator in cube inCube.off 50000 3)
- endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile hypergenerator. Version 4.6.0 is required.")
- endif ()
-endif()
+ endif(EIGEN3_FOUND)
+ endif(NOT CGAL_VERSION VERSION_LESS 4.6.0)
+endif(CGAL_FOUND)
diff --git a/src/Alpha_complex/example/CMakeLists.txt b/src/Alpha_complex/example/CMakeLists.txt
index f1c7ae97..71a95d61 100644
--- a/src/Alpha_complex/example/CMakeLists.txt
+++ b/src/Alpha_complex/example/CMakeLists.txt
@@ -28,10 +28,6 @@ if(CGAL_FOUND)
add_test(alphaoffreader_doc_60_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_60.txt ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_for_doc_60.txt)
add_test(alphaoffreader_doc_32_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_32.txt ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_for_doc_32.txt)
endif()
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for Alpha complex examples.")
- endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile Alpha complex examples. Version 4.7.0 is required.")
- endif ()
-endif()
+ endif(EIGEN3_FOUND)
+ endif(NOT CGAL_VERSION VERSION_LESS 4.7.0)
+endif(CGAL_FOUND)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 80f6e1ff..c02f816d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,12 +32,14 @@ else()
# A fix would be to use https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# 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)
+
+ # find CGAL in QUIET mode for cmake to be less verbose when CGAL is not found.
+ find_package(CGAL QUIET)
# Only CGAL versions > 4.4 supports what Gudhi uses from CGAL
- if (CGAL_VERSION VERSION_LESS 4.4.0)
+ if (CGAL_VERSION VERSION_LESS 4.4.0 AND CGAL_FOUND)
message("CGAL version ${CGAL_VERSION} is considered too old to be used by Gudhi.")
unset(CGAL_FOUND)
- endif()
+ endif(CGAL_VERSION VERSION_LESS 4.4.0 AND CGAL_FOUND)
if(CGAL_FOUND)
message(STATUS "CGAL version: ${CGAL_VERSION}.")
include( ${CGAL_USE_FILE} )
diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt
index 94b9fbfa..d97d1b63 100644
--- a/src/Persistent_cohomology/example/CMakeLists.txt
+++ b/src/Persistent_cohomology/example/CMakeLists.txt
@@ -48,8 +48,6 @@ if(GMP_FOUND)
add_test(rips_multifield_persistence_2_71 ${CMAKE_CURRENT_BINARY_DIR}/rips_multifield_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.2 -d 3 -p 2 -q 71 -m 100)
endif(GMPXX_FOUND)
-else()
- # message(WARNING "GMP not found.")
endif(GMP_FOUND)
if(CGAL_FOUND)
@@ -81,13 +79,6 @@ if(CGAL_FOUND)
add_test(alpha_complex_persistence_2_0_45 ${CMAKE_CURRENT_BINARY_DIR}/alpha_complex_persistence ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -m 0.45 -p 2)
add_test(periodic_alpha_complex_3d_persistence_2_0 ${CMAKE_CURRENT_BINARY_DIR}/periodic_alpha_complex_3d_persistence ${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off ${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt 2 0)
add_test(custom_persistence_sort ${CMAKE_CURRENT_BINARY_DIR}/custom_persistence_sort)
-
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for Alpha complex persistence examples.")
endif(EIGEN3_FOUND)
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile Alpha complex persistence examples. Version 4.7.0 is required.")
- endif ()
-else()
- # message(WARNING "CGAL not found.")
+ endif (NOT CGAL_VERSION VERSION_LESS 4.7.0)
endif(CGAL_FOUND)
diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt
index 48ba9279..4d67e0d0 100644
--- a/src/Witness_complex/example/CMakeLists.txt
+++ b/src/Witness_complex/example/CMakeLists.txt
@@ -11,10 +11,6 @@ if(CGAL_FOUND)
add_executable ( witness_complex_sphere witness_complex_sphere.cpp )
target_link_libraries(witness_complex_sphere ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
add_test( witness_complex_sphere_10 ${CMAKE_CURRENT_BINARY_DIR}/witness_complex_sphere 10)
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for witness_complex_sphere example.")
- endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile witness_complex_sphere example. Version 4.6.0 is required.")
- endif ()
+ endif(EIGEN3_FOUND)
+ endif (NOT CGAL_VERSION VERSION_LESS 4.6.0)
endif()
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
index 4ea8c9cb..0da3dcc0 100644
--- a/src/common/example/CMakeLists.txt
+++ b/src/common/example/CMakeLists.txt
@@ -12,10 +12,6 @@ if(CGAL_FOUND)
add_executable ( cgaloffreader CGAL_points_off_reader.cpp )
target_link_libraries(cgaloffreader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
add_test(cgaloffreader ${CMAKE_CURRENT_BINARY_DIR}/cgaloffreader ${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off)
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for cgaloffreader example.")
- endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile cgaloffreader example. Version 4.7.0 is required.")
- endif ()
+ endif(EIGEN3_FOUND)
+ endif (NOT CGAL_VERSION VERSION_LESS 4.7.0)
endif()