summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/Contraction/example/CMakeLists.txt5
-rw-r--r--src/Contraction/test/CMakeLists.txt4
-rw-r--r--src/Contraction/test/TestContraction.cpp32
-rw-r--r--src/Persistent_cohomology/example/CMakeLists.txt12
-rw-r--r--src/Persistent_cohomology/test/CMakeLists.txt9
-rw-r--r--src/Simplex_tree/example/CMakeLists.txt10
-rw-r--r--src/Simplex_tree/test/CMakeLists.txt7
-rw-r--r--src/Skeleton_blocker/example/CMakeLists.txt6
-rw-r--r--src/Skeleton_blocker/test/CMakeLists.txt7
10 files changed, 41 insertions, 58 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index deb5f28d..ac31ab7e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHI)
-#find_package(Boost 1.45.0 COMPONENTS system filesystem unit_test_framework chrono timer)
-find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework chrono timer REQUIRED)
+find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework chrono timer program_options REQUIRED)
set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/modules/")
@@ -15,7 +14,7 @@ if(MSVC)
# Turn off some VC++ warnings
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -Wall -Wpedantic -lboost_system -lboost_unit_test_framework -lgmpxx -lgmp")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -Wall -Wpedantic -lboost_system -lboost_timer -lboost_unit_test_framework -lgmpxx -lgmp")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif()
@@ -56,6 +55,8 @@ else()
add_subdirectory(src/Simplex_tree/example)
add_subdirectory(src/Persistent_cohomology/test)
add_subdirectory(src/Persistent_cohomology/example)
+ add_subdirectory(src/Skeleton_blocker/test)
add_subdirectory(src/Skeleton_blocker/example)
+ add_subdirectory(src/Contraction/test)
add_subdirectory(src/Contraction/example)
endif()
diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt
index 717830da..13eb5537 100644
--- a/src/Contraction/example/CMakeLists.txt
+++ b/src/Contraction/example/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIskbl)
-add_executable ( RipsContraction Rips_contraction.cpp)
-target_link_libraries( RipsContraction ${Boost_TIMER_LIBRARY})
+add_executable(RipsContraction Rips_contraction.cpp)
+target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+add_test(RipsContraction ${CMAKE_CURRENT_BINARY_DIR}/RipsContraction ${CMAKE_SOURCE_DIR}/data/meshes/sphere3D_2646.off 0.2)
diff --git a/src/Contraction/test/CMakeLists.txt b/src/Contraction/test/CMakeLists.txt
index 049b4ea1..b52c4862 100644
--- a/src/Contraction/test/CMakeLists.txt
+++ b/src/Contraction/test/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIskbl)
-add_executable ( TestContraction TestContraction.cpp )
-
+add_executable(TestContraction TestContraction.cpp)
+add_test(TestContraction ${CMAKE_CURRENT_BINARY_DIR}/TestContraction ${CMAKE_SOURCE_DIR}/data/meshes/SO3_50000.off 0.2)
diff --git a/src/Contraction/test/TestContraction.cpp b/src/Contraction/test/TestContraction.cpp
index f0604396..1090c054 100644
--- a/src/Contraction/test/TestContraction.cpp
+++ b/src/Contraction/test/TestContraction.cpp
@@ -7,27 +7,25 @@
#include <ctime>
#include <list>
-#include "combinatorics/Skeleton_blocker/Skeleton_blocker_simple_traits.h"
-#include "geometry/Skeleton_blocker_simple_geometric_traits.h"
+#include "gudhi/Skeleton_blocker/Skeleton_blocker_simple_traits.h"
+#include "gudhi/Skeleton_blocker/Skeleton_blocker_simple_geometric_traits.h"
//#include "Skeleton_blocker/Simplex.h"
-#include "contraction/Skeleton_blocker_contractor.h"
-#include "Utils.h"
-#include "iofile.h"
-#include "Test.h"
-#include "Skeleton_blocker_geometric_complex.h"
+#include "gudhi/Skeleton_blocker_contractor.h"
+#include "gudhi/Utils.h"
+#include "gudhi/iofile.h"
+#include "gudhi/Test.h"
+#include "gudhi/Skeleton_blocker_geometric_complex.h"
//#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
-#include "contraction/Edge_profile.h"
-
-#include "contraction/policies/Cost_policy.h"
-#include "contraction/policies/Edge_length_cost.h"
-#include "contraction/policies/Placement_policy.h"
-#include "contraction/policies/Middle_placement.h"
-
-#include "contraction/policies/Valid_contraction_policy.h"
-#include "contraction/policies/Dummy_valid_contraction.h"
-#include "contraction/policies/Link_condition_valid_contraction.h"
+#include "gudhi/Contraction/Edge_profile.h"
+#include "gudhi/Contraction/policies/Cost_policy.h"
+#include "gudhi/Contraction/policies/Edge_length_cost.h"
+#include "gudhi/Contraction/policies/Placement_policy.h"
+#include "gudhi/Contraction/policies/Middle_placement.h"
+#include "gudhi/Contraction/policies/Valid_contraction_policy.h"
+#include "gudhi/Contraction/policies/Dummy_valid_contraction.h"
+#include "gudhi/Contraction/policies/Link_condition_valid_contraction.h"
using namespace std;
diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt
index 98213545..5c337f0b 100644
--- a/src/Persistent_cohomology/example/CMakeLists.txt
+++ b/src/Persistent_cohomology/example/CMakeLists.txt
@@ -1,29 +1,25 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIExPersCohom)
-# NEED TO FIND BOOST NEEDED COMPONENTS TO LINK WITH
-find_package(Boost 1.45.0 COMPONENTS system program_options)
-message("Boost_lib = ${Boost_LIBRARIES}")
-
add_executable(rips_persistence rips_persistence.cpp)
-target_link_libraries(rips_persistence ${Boost_LIBRARIES})
+target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY})
add_test(rips_persistence_2 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 2 -m 100)
add_test(rips_persistence_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 3 -m 100)
add_executable(rips_persistence_from_alpha_shape_3 rips_persistence_from_alpha_shape_3.cpp )
-target_link_libraries(rips_persistence_from_alpha_shape_3 ${Boost_LIBRARIES})
+target_link_libraries(rips_persistence_from_alpha_shape_3 ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY})
if(GMPXX_FOUND AND GMP_FOUND)
message("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}")
message("GMP_LIBRARIES = ${GMP_LIBRARIES}")
add_executable(rips_multifield_persistence rips_multifield_persistence.cpp )
- target_link_libraries(rips_multifield_persistence ${Boost_LIBRARIES} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
+ target_link_libraries(rips_multifield_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
add_test(rips_multifield_persistence_2_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_multifield_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 2 -q 3 -m 100)
add_test(rips_multifield_persistence_2_71 ${CMAKE_CURRENT_BINARY_DIR}/rips_multifield_persistence ${CMAKE_SOURCE_DIR}/data/points/Kl.txt -r 0.25 -d 3 -p 2 -q 71 -m 100)
add_executable ( performance_rips_persistence performance_rips_persistence.cpp )
- target_link_libraries(performance_rips_persistence ${Boost_LIBRARIES} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
+ target_link_libraries(performance_rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
add_test(rips_persistence_from_alpha_shape_3_2_0 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence_from_alpha_shape_3 ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 2 -m 0)
add_test(rips_persistence_from_alpha_shape_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence_from_alpha_shape_3 ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.st -p 3 -m 100)
endif()
diff --git a/src/Persistent_cohomology/test/CMakeLists.txt b/src/Persistent_cohomology/test/CMakeLists.txt
index c1cbc572..01432aa1 100644
--- a/src/Persistent_cohomology/test/CMakeLists.txt
+++ b/src/Persistent_cohomology/test/CMakeLists.txt
@@ -1,26 +1,21 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHITestSimplexTree)
-# NEED TO FIND BOOST NEEDED COMPONENTS TO LINK WITH
-find_package(Boost 1.45.0 COMPONENTS system unit_test_framework)
-message("Boost_lib = ${Boost_LIBRARIES}")
-
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} --coverage")
endif()
-include_directories(${Boost_INCLUDE_DIRS})
add_executable ( persistent_cohomology_unit_test persistent_cohomology_unit_test.cpp )
-target_link_libraries(persistent_cohomology_unit_test ${Boost_LIBRARIES})
+target_link_libraries(persistent_cohomology_unit_test ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
# Unitary tests
add_test(persistent_cohomology_unit_test ${CMAKE_CURRENT_BINARY_DIR}/persistent_cohomology_unit_test)
if(GMPXX_FOUND AND GMP_FOUND)
add_executable ( persistent_cohomology_unit_test_multi_field persistent_cohomology_unit_test_multi_field.cpp )
- target_link_libraries(persistent_cohomology_unit_test_multi_field ${Boost_LIBRARIES} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
+ target_link_libraries(persistent_cohomology_unit_test_multi_field ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
# Unitary tests
#add_test(persistent_cohomology_unit_test_multi_field ${CMAKE_CURRENT_BINARY_DIR}/persistent_cohomology_unit_test_multi_field)
diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt
index 956d1fa9..cf7585b9 100644
--- a/src/Simplex_tree/example/CMakeLists.txt
+++ b/src/Simplex_tree/example/CMakeLists.txt
@@ -1,17 +1,13 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHISimplexTreeFromFile)
-# NEED TO FIND BOOST NEEDED COMPONENTS TO LINK WITH
-find_package(Boost 1.45.0 COMPONENTS system thread)
-message("Boost_lib = ${Boost_LIBRARIES}")
-
add_executable ( simplex_tree_from_file simplex_tree_from_file.cpp )
-target_link_libraries(simplex_tree_from_file ${Boost_LIBRARIES})
+target_link_libraries(simplex_tree_from_file ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
add_test(simplex_tree_from_file_2 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_file ${CMAKE_SOURCE_DIR}/data/points/Klein_bottle_complex.txt 2)
add_test(simplex_tree_from_file_3 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_file ${CMAKE_SOURCE_DIR}/data/points/Klein_bottle_complex.txt 3)
add_executable ( simple_simplex_tree simple_simplex_tree.cpp )
-target_link_libraries(simple_simplex_tree ${Boost_LIBRARIES})
+target_link_libraries(simple_simplex_tree ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
add_test(simple_simplex_tree ${CMAKE_CURRENT_BINARY_DIR}/simple_simplex_tree)
# An example with Simplex-tree using CGAL alpha_shapes_3
@@ -21,6 +17,6 @@ if(GMPXX_FOUND AND GMP_FOUND AND CGAL_FOUND)
message("GMP_LIBRARIES = ${GMP_LIBRARIES}")
add_executable ( simplex_tree_from_alpha_shapes_3 simplex_tree_from_alpha_shapes_3.cpp )
- target_link_libraries(simplex_tree_from_alpha_shapes_3 ${Boost_LIBRARIES} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES} ${CGAL_LIBRARY})
+ target_link_libraries(simplex_tree_from_alpha_shapes_3 ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES} ${CGAL_LIBRARY})
add_test(simplex_tree_from_alpha_shapes_3 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_alpha_shapes_3 ${CMAKE_SOURCE_DIR}/data/points/bunny_5000)
endif()
diff --git a/src/Simplex_tree/test/CMakeLists.txt b/src/Simplex_tree/test/CMakeLists.txt
index e3fcc557..80594870 100644
--- a/src/Simplex_tree/test/CMakeLists.txt
+++ b/src/Simplex_tree/test/CMakeLists.txt
@@ -1,19 +1,14 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHITestSimplexTree)
-# NEED TO FIND BOOST NEEDED COMPONENTS TO LINK WITH
-find_package(Boost 1.45.0 COMPONENTS system unit_test_framework)
-message("Boost_lib = ${Boost_LIBRARIES}")
-
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} --coverage")
endif()
-include_directories(${Boost_INCLUDE_DIRS})
add_executable ( simplex_tree_unit_test simplex_tree_unit_test.cpp )
-target_link_libraries(simplex_tree_unit_test ${Boost_LIBRARIES})
+target_link_libraries(simplex_tree_unit_test ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
# Unitary tests
add_test(simplex_tree_unit_test ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_unit_test)
diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt
index 0aed1e7a..c8e976cd 100644
--- a/src/Skeleton_blocker/example/CMakeLists.txt
+++ b/src/Skeleton_blocker/example/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIskbl)
-add_executable ( SkeletonBlockerIteration Skeleton_blocker_iteration.cpp )
-
-target_link_libraries( SkeletonBlockerIteration ${Boost_TIMER_LIBRARY})
+add_executable(SkeletonBlockerIteration Skeleton_blocker_iteration.cpp)
+target_link_libraries(SkeletonBlockerIteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+add_test(SkeletonBlockerIteration ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerIteration)
diff --git a/src/Skeleton_blocker/test/CMakeLists.txt b/src/Skeleton_blocker/test/CMakeLists.txt
index d66dcf64..0047499d 100644
--- a/src/Skeleton_blocker/test/CMakeLists.txt
+++ b/src/Skeleton_blocker/test/CMakeLists.txt
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 2.6)
project(GUDHIskbl)
-add_executable ( TestSkeletonBlockerComplex TestSkeletonBlockerComplex.cpp )
-add_executable ( TestSimplifiable TestSimplifiable.cpp )
-
+add_executable(TestSkeletonBlockerComplex TestSkeletonBlockerComplex.cpp)
+add_executable(TestSimplifiable TestSimplifiable.cpp)
+add_test(TestSkeletonBlockerComplex ${CMAKE_CURRENT_BINARY_DIR}/TestSkeletonBlockerComplex)
+add_test(TestSimplifiable ${CMAKE_CURRENT_BINARY_DIR}/TestSimplifiable)