diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-01-30 10:45:27 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-01-30 10:45:27 +0000 |
commit | fb1c4cd4e98f979e7aa5042fb16da1c3884efe7f (patch) | |
tree | ee19a19a305e48c986fb992ab95fba29508f42e2 /src | |
parent | 41ec4dc1ae5770002ad81a43e5b5bf9b2fca1b98 (diff) |
Add conditionnal GMP link for CGAL (optionnal)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/TDA_dev_1.1.0@447 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 91cf5ba77bcd3eff6f69e34af0aeb228b5c1b462
Diffstat (limited to 'src')
-rw-r--r-- | src/Persistent_cohomology/example/CMakeLists.txt | 26 | ||||
-rw-r--r-- | src/Persistent_cohomology/example/alpha_shapes_persistence.cpp | 2 |
2 files changed, 18 insertions, 10 deletions
diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index 842f852a..6c77bfe8 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -14,6 +14,23 @@ if (NOT MSVC) add_test(persistence_from_file_3_2_0 ${CMAKE_CURRENT_BINARY_DIR}/persistence_from_file ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 2 -m 0) add_test(persistence_from_file_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/persistence_from_file ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 3 -m 100) + message(STATUS "CGAL_DISABLE_GMP =" ${CGAL_DISABLE_GMP}) + if(NOT CGAL_DISABLE_GMP) + set(GMP_LIBRARIES_IF_NEEDED ${GMP_LIBRARIES}) + endif() + message(STATUS "GMP_LIBRARIES_IF_NEEDED =" ${GMP_LIBRARIES_IF_NEEDED}) + + if(CGAL_FOUND) + message("CGAL_LIBRARIES_DIR = ${CGAL_LIBRARIES_DIR}") + message("CGAL_INCLUDE_DIRS = ${CGAL_INCLUDE_DIRS}") + add_definitions(-DDEBUG_TRACES -DNDEBUG) + INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIRS}) + add_executable(alpha_shapes_persistence alpha_shapes_persistence.cpp) + target_link_libraries(alpha_shapes_persistence ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY} ${GMP_LIBRARIES_IF_NEEDED}) + add_test(alpha_shapes_persistence_2_0_5 ${CMAKE_CURRENT_BINARY_DIR}/alpha_shapes_persistence ${CMAKE_SOURCE_DIR}/data/points/bunny_5000 2 0.5) + #add_test(alpha_shapes_persistence_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/alpha_shapes_persistence ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 3 -m 100) + endif() + if(GMPXX_FOUND AND GMP_FOUND) message("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") message("GMP_LIBRARIES = ${GMP_LIBRARIES}") @@ -25,14 +42,5 @@ if (NOT MSVC) add_executable ( performance_rips_persistence performance_rips_persistence.cpp ) target_link_libraries(performance_rips_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) - - if(CGAL_FOUND) - add_definitions(-DDEBUG_TRACES) - add_executable(alpha_shapes_persistence alpha_shapes_persistence.cpp) - target_link_libraries(alpha_shapes_persistence ${Boost_SYSTEM_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES} ${CGAL_LIBRARY}) - add_test(alpha_shapes_persistence_2_0_5 ${CMAKE_CURRENT_BINARY_DIR}/alpha_shapes_persistence ${CMAKE_SOURCE_DIR}/data/points/bunny_5000 2 0.5) - #add_test(alpha_shapes_persistence_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/alpha_shapes_persistence ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 3 -m 100) - endif() - endif() endif() diff --git a/src/Persistent_cohomology/example/alpha_shapes_persistence.cpp b/src/Persistent_cohomology/example/alpha_shapes_persistence.cpp index 0591a0ca..f75351c0 100644 --- a/src/Persistent_cohomology/example/alpha_shapes_persistence.cpp +++ b/src/Persistent_cohomology/example/alpha_shapes_persistence.cpp @@ -297,7 +297,7 @@ int main (int argc, char * const argv[]) pcoh.compute_persistent_cohomology( (Filtration_value)min_persistence ); - pcoh.output_diagram(); + pcoh.write_output_diagram("test.txt"); return 0; } |