From 9ed5279c478f5d79151e7f99390da7eb23f11550 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 2 Oct 2017 15:47:32 +0000 Subject: Fix weighted_alpha_complex_3d_persistence to work with CGAL 4.11 (2 cpp and cmake compiles the correct one) Homogeneize alpha_complex_3d* codes Fix weighted_periodic_alpha_complex_3d_persistence with CGAL doc help Add grid off file with weights to test weighted_periodic_alpha_complex_3d_persistence git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2744 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ecc4f3629e75bd986ffd22ec348f0412163e4dbd --- src/Persistent_cohomology/example/CMakeLists.txt | 41 +++++++++++++++++------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'src/Persistent_cohomology/example/CMakeLists.txt') diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index cc421bff..f6c866dc 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -73,30 +73,18 @@ if(CGAL_FOUND) target_link_libraries(alpha_complex_3d_persistence ${CGAL_LIBRARY}) add_executable(exact_alpha_complex_3d_persistence exact_alpha_complex_3d_persistence.cpp) target_link_libraries(exact_alpha_complex_3d_persistence ${CGAL_LIBRARY}) - add_executable(weighted_alpha_complex_3d_persistence weighted_alpha_complex_3d_persistence.cpp) - target_link_libraries(weighted_alpha_complex_3d_persistence ${CGAL_LIBRARY}) - add_executable(weighted_periodic_alpha_complex_3d_persistence weighted_periodic_alpha_complex_3d_persistence.cpp) - target_link_libraries(weighted_periodic_alpha_complex_3d_persistence ${CGAL_LIBRARY}) - - if (TBB_FOUND) target_link_libraries(alpha_complex_3d_persistence ${TBB_LIBRARIES}) target_link_libraries(exact_alpha_complex_3d_persistence ${TBB_LIBRARIES}) - target_link_libraries(weighted_alpha_complex_3d_persistence ${TBB_LIBRARIES}) - target_link_libraries(weighted_periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES}) endif(TBB_FOUND) add_test(NAME Persistent_cohomology_example_alpha_complex_3d COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45") add_test(NAME Persistent_cohomology_example_exact_alpha_complex_3d COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45") - add_test(NAME Persistent_cohomology_example_weighted_alpha_complex_3d COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.weights" "2" "0.45") install(TARGETS alpha_complex_3d_persistence DESTINATION bin) install(TARGETS exact_alpha_complex_3d_persistence DESTINATION bin) - install(TARGETS weighted_alpha_complex_3d_persistence DESTINATION bin) - install(TARGETS weighted_periodic_alpha_complex_3d_persistence DESTINATION bin) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) add_executable (alpha_complex_persistence alpha_complex_persistence.cpp) @@ -125,4 +113,33 @@ if(CGAL_FOUND) install(TARGETS custom_persistence_sort DESTINATION bin) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) + + if (NOT CGAL_VERSION VERSION_LESS 4.11.0) + add_executable(weighted_periodic_alpha_complex_3d_persistence weighted_periodic_alpha_complex_3d_persistence.cpp) + target_link_libraries(weighted_periodic_alpha_complex_3d_persistence ${CGAL_LIBRARY}) + if (TBB_FOUND) + target_link_libraries(weighted_periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES}) + endif(TBB_FOUND) + + install(TARGETS weighted_periodic_alpha_complex_3d_persistence DESTINATION bin) + + # On CGAL 4.11, the weighted alpha shape 3 interface was changed - the new interface + add_executable(weighted_alpha_complex_3d_persistence weighted_alpha_complex_3d_persistence.cpp) + else(NOT CGAL_VERSION VERSION_LESS 4.11.0) + # On CGAL 4.11, the weighted alpha shape 3 interface was changed - the old interface + add_executable(weighted_alpha_complex_3d_persistence weighted_alpha_complex_3d_persistence_old_cgal_interface.cpp) + endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) + + # cf. if (NOT CGAL_VERSION VERSION_LESS 4.11.0) and else(NOT CGAL_VERSION VERSION_LESS 4.11.0) + # same target name on purpose + target_link_libraries(weighted_alpha_complex_3d_persistence ${CGAL_LIBRARY}) + if (TBB_FOUND) + target_link_libraries(weighted_alpha_complex_3d_persistence ${TBB_LIBRARIES}) + endif(TBB_FOUND) + + install(TARGETS weighted_alpha_complex_3d_persistence DESTINATION bin) + + add_test(NAME Persistent_cohomology_example_weighted_alpha_complex_3d COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.weights" "2" "0.45") + endif(CGAL_FOUND) -- cgit v1.2.3