summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-19 08:56:56 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-19 08:56:56 +0200
commit9d4e6f28ceeb362c9d751cbac730a13d1b5d61c7 (patch)
tree69c79c54efd7d3b62022f92ce73d091d22a2b0b0 /src
parentf9f6288c4815c08d561fc8b2a26fa0f0be1404f2 (diff)
CGAL 4.11 as minimal version
Diffstat (limited to 'src')
-rw-r--r--src/GudhUI/CMakeLists.txt2
-rw-r--r--src/Simplex_tree/example/CMakeLists.txt4
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake2
-rw-r--r--src/common/example/CMakeLists.txt24
-rw-r--r--src/cython/CMakeLists.txt2
5 files changed, 15 insertions, 19 deletions
diff --git a/src/GudhUI/CMakeLists.txt b/src/GudhUI/CMakeLists.txt
index ab29097b..9b73dcaa 100644
--- a/src/GudhUI/CMakeLists.txt
+++ b/src/GudhUI/CMakeLists.txt
@@ -9,7 +9,7 @@ if (OPENGL_FOUND)
find_package(QGLViewer QUIET)
if ( QGLVIEWER_FOUND)
- if ( CGAL_FOUND AND NOT CGAL_VERSION VERSION_LESS 4.11.0)
+ if (NOT CGAL_VERSION VERSION_LESS 4.11.0)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt
index 1a6de60a..f99b164c 100644
--- a/src/Simplex_tree/example/CMakeLists.txt
+++ b/src/Simplex_tree/example/CMakeLists.txt
@@ -19,7 +19,7 @@ add_executable ( Simplex_tree_example_mini_simplex_tree mini_simplex_tree.cpp )
add_test(NAME Simplex_tree_example_mini_simplex_tree COMMAND $<TARGET_FILE:Simplex_tree_example_mini_simplex_tree>)
# An example with Simplex-tree using CGAL alpha_shapes_3
-if(GMP_FOUND AND CGAL_FOUND)
+if(GMP_FOUND AND NOT CGAL_VERSION VERSION_LESS 4.11.0)
add_executable ( Simplex_tree_example_alpha_shapes_3_from_off example_alpha_shapes_3_simplex_tree_from_off_file.cpp )
target_link_libraries(Simplex_tree_example_alpha_shapes_3_from_off ${GMP_LIBRARIES} ${CGAL_LIBRARY})
if (TBB_FOUND)
@@ -38,7 +38,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
endif()
add_test(NAME Simplex_tree_example_cech_complex_cgal_mini_sphere_3d COMMAND $<TARGET_FILE:Simplex_tree_example_cech_complex_cgal_mini_sphere_3d>
"${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" -r 0.3 -d 3)
-endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
+endif ()
add_executable ( Simplex_tree_example_graph_expansion_with_blocker graph_expansion_with_blocker.cpp )
if (TBB_FOUND)
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index 477900ae..1dbddfd9 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -27,7 +27,9 @@ find_package(CGAL QUIET)
if (CGAL_FOUND AND CGAL_VERSION VERSION_LESS 4.11.0)
message("++ CGAL version ${CGAL_VERSION} is considered too old to be used by Gudhi.")
unset(CGAL_FOUND)
+ unset(CGAL_VERSION)
endif()
+
if(CGAL_FOUND)
message(STATUS "CGAL version: ${CGAL_VERSION}.")
include( ${CGAL_USE_FILE} )
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
index b9263cc9..583a0027 100644
--- a/src/common/example/CMakeLists.txt
+++ b/src/common/example/CMakeLists.txt
@@ -6,8 +6,6 @@ file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CM
add_test(NAME Common_example_vector_double_off_reader COMMAND $<TARGET_FILE:vector_double_off_reader>
"alphacomplexdoc.off")
-install(TARGETS vector_double_off_reader DESTINATION bin)
-
if (DIFF_PATH)
# Do not forget to copy test results files in current binary dir
file(COPY "vectordoubleoffreader_result.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
@@ -16,21 +14,17 @@ if (DIFF_PATH)
${CMAKE_CURRENT_BINARY_DIR}/vectordoubleoffreader_result.txt ${CMAKE_CURRENT_BINARY_DIR}/alphacomplexdoc.off.txt)
endif()
-if(CGAL_FOUND)
+if(NOT CGAL_VERSION VERSION_LESS 4.11.0)
add_executable ( cgal_3D_off_reader example_CGAL_3D_points_off_reader.cpp )
target_link_libraries(cgal_3D_off_reader ${CGAL_LIBRARY})
add_test(NAME Common_example_vector_cgal_3D_off_reader COMMAND $<TARGET_FILE:cgal_3D_off_reader>
"${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off")
-
- install(TARGETS cgal_3D_off_reader DESTINATION bin)
-
- # need CGAL 4.7 and Eigen3
- if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
- add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
- target_link_libraries(cgal_off_reader ${CGAL_LIBRARY})
- add_test(NAME Common_example_vector_cgal_off_reader COMMAND $<TARGET_FILE:cgal_off_reader>
- "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off")
- install(TARGETS cgal_off_reader DESTINATION bin)
- endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
-
endif()
+
+# requires CGAL and Eigen3
+if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
+ add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
+ target_link_libraries(cgal_off_reader ${CGAL_LIBRARY})
+ add_test(NAME Common_example_vector_cgal_off_reader COMMAND $<TARGET_FILE:cgal_off_reader>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off")
+endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index af71bb3b..509a122e 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -412,7 +412,7 @@ if(PYTHONINTERP_FOUND)
# Set missing or not modules
set(GUDHI_MODULES ${GUDHI_MODULES} "python-documentation" CACHE INTERNAL "GUDHI_MODULES")
else(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
- message("++ Python documentation module will not be compiled because it requires a CGAL with Eigen3 version greater or equal than 4.8.1")
+ message("++ Python documentation module will not be compiled because it requires a Eigen3 and CGAL version >= 4.11.0")
set(GUDHI_MISSING_MODULES ${GUDHI_MISSING_MODULES} "python-documentation" CACHE INTERNAL "GUDHI_MISSING_MODULES")
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
else(SCIPY_FOUND)