summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--biblio/bibliography.bib2
-rw-r--r--data/points/generator/CMakeLists.txt19
-rw-r--r--data/points/generator/README8
-rw-r--r--src/Alpha_complex/doc/Intro_alpha_complex.h4
-rw-r--r--src/Alpha_complex/example/CMakeLists.txt29
-rw-r--r--src/Alpha_complex/test/CMakeLists.txt21
-rw-r--r--src/Alpha_complex/test/README2
-rw-r--r--src/Bitmap_cubical_complex/example/CMakeLists.txt33
-rw-r--r--src/Bitmap_cubical_complex/test/CMakeLists.txt22
-rw-r--r--src/Bottleneck_distance/example/CMakeLists.txt10
-rw-r--r--src/Bottleneck_distance/test/CMakeLists.txt24
-rw-r--r--src/Bottleneck_distance/test/README2
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Contraction/example/CMakeLists.txt9
-rw-r--r--src/Persistent_cohomology/example/CMakeLists.txt56
-rw-r--r--src/Persistent_cohomology/test/CMakeLists.txt54
-rw-r--r--src/Persistent_cohomology/test/README10
-rw-r--r--src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp6
-rw-r--r--src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp6
-rw-r--r--src/Rips_complex/doc/Intro_rips_complex.h8
-rw-r--r--src/Rips_complex/example/CMakeLists.txt61
-rw-r--r--src/Rips_complex/test/CMakeLists.txt19
-rw-r--r--src/Simplex_tree/example/CMakeLists.txt33
-rw-r--r--src/Simplex_tree/example/README8
-rw-r--r--src/Simplex_tree/test/CMakeLists.txt22
-rw-r--r--src/Skeleton_blocker/example/CMakeLists.txt14
-rw-r--r--src/Skeleton_blocker/test/CMakeLists.txt37
-rw-r--r--src/Spatial_searching/example/CMakeLists.txt16
-rw-r--r--src/Spatial_searching/test/CMakeLists.txt15
-rw-r--r--src/Subsampling/example/CMakeLists.txt12
-rw-r--r--src/Subsampling/test/CMakeLists.txt25
-rw-r--r--src/Tangential_complex/example/CMakeLists.txt9
-rw-r--r--src/Tangential_complex/test/CMakeLists.txt15
-rw-r--r--src/Witness_complex/example/CMakeLists.txt30
-rw-r--r--src/Witness_complex/test/CMakeLists.txt21
-rw-r--r--src/cmake/modules/GUDHI_doxygen_target.cmake (renamed from src/cmake/modules/GUDHI_doxygen_target.txt)0
-rw-r--r--src/cmake/modules/GUDHI_test_coverage.cmake14
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake (renamed from src/cmake/modules/GUDHI_third_party_libraries.txt)0
-rw-r--r--src/common/example/CMakeLists.txt9
-rw-r--r--src/common/test/CMakeLists.txt29
41 files changed, 302 insertions, 420 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35604652..324f8648 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,11 +13,11 @@ enable_testing()
# For "make user_version"
include("${CMAKE_MODULE_PATH}/GUDHI_user_version_target.txt")
# For "make doxygen"
-include("${CMAKE_MODULE_PATH}/GUDHI_doxygen_target.txt")
+include(GUDHI_doxygen_target)
# This variable is used by Cython CMakeLists.txt to know its path
set(GUDHI_CYTHON_PATH "src/cython")
# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH
-include("${CMAKE_MODULE_PATH}/GUDHI_third_party_libraries.txt")
+include(GUDHI_third_party_libraries)
if(MSVC)
# Turn off some VC++ warnings
diff --git a/biblio/bibliography.bib b/biblio/bibliography.bib
index 9d53a628..29fc5650 100644
--- a/biblio/bibliography.bib
+++ b/biblio/bibliography.bib
@@ -111,7 +111,7 @@ language={English},
@techreport{boissonnat:hal-00922572,
hal_id = {hal-00922572},
url = {http://hal.inria.fr/hal-00922572},
- title = {\href{http://hal.inria.fr/hal-00922572}{Computing Persistent Homology with Various Coefficient Fields in a Single Pass}},
+ title = {Computing Persistent Homology with Various Coefficient Fields in a Single Pass},
author = {Boissonnat, Jean-Daniel and Maria, Cl{\'e}ment},
abstract = {{In this article, we introduce the multi-field persistence diagram for the persistence homology of a filtered complex. It encodes compactly the superimposition of the persistence diagrams of the complex with several field coefficients, and provides a substantially more precise description of the topology of the filtered complex. Specifically, the multi-field persistence diagram encodes the Betti numbers of integral homology and the prime divisors of the torsion coefficients of the underlying shape. Moreover, it enjoys similar stability properties as the ones of standard persistence diagrams, with the appropriate notion of distance. These properties make the multi-field persistence diagram a useful tool in computational topology.}},
keywords = {Computational Topology, Persistent homology, Modular reconstruction},
diff --git a/data/points/generator/CMakeLists.txt b/data/points/generator/CMakeLists.txt
index 9a7f7bce..88d377a7 100644
--- a/data/points/generator/CMakeLists.txt
+++ b/data/points/generator/CMakeLists.txt
@@ -1,14 +1,15 @@
cmake_minimum_required(VERSION 2.6)
-project(Data_points_generator)
+project(data_points_generator)
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
- add_executable ( hypergenerator hypergenerator.cpp )
- target_link_libraries(hypergenerator ${Boost_SYSTEM_LIBRARY})
- add_test(hypergenerator_on_sphere_3000_10_5.0 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator on sphere onSphere.off 3000 10 5.0)
- add_test(hypergenerator_on_sphere_10000_3 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator on sphere onSphere.off 10000 3)
- add_test(hypergenerator_in_sphere_7000_12_10.8 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator in sphere inSphere.off 7000 12 10.8)
- add_test(hypergenerator_in_sphere_50000_2 ${CMAKE_CURRENT_BINARY_DIR}/hypergenerator in sphere inSphere.off 50000 2)
+ add_executable ( data_points_generator hypergenerator.cpp )
+ target_link_libraries(data_points_generator ${Boost_SYSTEM_LIBRARY})
+ add_test(NAME data_points_generator_on_sphere_1000_3_15.2 COMMAND $<TARGET_FILE:data_points_generator>
+ "on" "sphere" "onSphere.off" "1000" "3" "15.2")
+ add_test(NAME data_points_generator_in_sphere_100_2 COMMAND $<TARGET_FILE:data_points_generator>
+ "in" "sphere" "inSphere.off" "100" "2")
+
# 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)
+ add_test(NAME data_points_generator_in_cube_10000_3_5.8 COMMAND $<TARGET_FILE:data_points_generator>
+ "in" "cube" "inCube.off" "10000" "3" "5.8")
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
diff --git a/data/points/generator/README b/data/points/generator/README
index 41cb9165..951bcfe1 100644
--- a/data/points/generator/README
+++ b/data/points/generator/README
@@ -7,21 +7,21 @@ cmake .
cd /path-to-data-generator/
make
-=========================== hypergenerator =====================================
+======================= data_points_generator ==================================
Example of use :
*** Hyper sphere|cube generator
-./hypergenerator on sphere onSphere.off 1000 3 15.2
+./data_points_generator on sphere onSphere.off 1000 3 15.2
=> generates a onSphere.off file with 1000 points randomized on a sphere of dimension 3 and radius 15.2
-./hypergenerator in sphere inSphere.off 100 2
+./data_points_generator in sphere inSphere.off 100 2
=> generates a inSphere.off file with 100 points randomized in a sphere of dimension 2 (circle) and radius 1.0 (default)
-./hypergenerator in cube inCube.off 10000 3 5.8
+./data_points_generator in cube inCube.off 10000 3 5.8
=> generates a inCube.off file with 10000 points randomized in a cube of dimension 3 and side 5.8
diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h
index 3ffdae7f..69959fc5 100644
--- a/src/Alpha_complex/doc/Intro_alpha_complex.h
+++ b/src/Alpha_complex/doc/Intro_alpha_complex.h
@@ -71,7 +71,7 @@ namespace alpha_complex {
*
* When launching:
*
- * \code $> ./alphapoints
+ * \code $> ./Alpha_complex_example_from_points
* \endcode
*
* the program output is:
@@ -155,7 +155,7 @@ namespace alpha_complex {
*
* When launching:
*
- * \code $> ./alphaoffreader ../../data/points/alphacomplexdoc.off 32.0
+ * \code $> ./Alpha_complex_example_from_off ../../data/points/alphacomplexdoc.off 32.0
* \endcode
*
* the program output is:
diff --git a/src/Alpha_complex/example/CMakeLists.txt b/src/Alpha_complex/example/CMakeLists.txt
index b9bcdb55..a4853d78 100644
--- a/src/Alpha_complex/example/CMakeLists.txt
+++ b/src/Alpha_complex/example/CMakeLists.txt
@@ -4,26 +4,29 @@ project(Alpha_complex_examples)
# need CGAL 4.7
# cmake -DCGAL_DIR=~/workspace/CGAL-4.7 ..
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
- add_executable ( alphapoints Alpha_complex_from_points.cpp )
- target_link_libraries(alphapoints ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY})
- add_executable ( alphaoffreader Alpha_complex_from_off.cpp )
- target_link_libraries(alphaoffreader ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY})
+ add_executable ( Alpha_complex_example_from_points Alpha_complex_from_points.cpp )
+ target_link_libraries(Alpha_complex_example_from_points ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY})
+ add_executable ( Alpha_complex_example_from_off Alpha_complex_from_off.cpp )
+ target_link_libraries(Alpha_complex_example_from_off ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(alphapoints ${TBB_LIBRARIES})
- target_link_libraries(alphaoffreader ${TBB_LIBRARIES})
+ target_link_libraries(Alpha_complex_example_from_points ${TBB_LIBRARIES})
+ target_link_libraries(Alpha_complex_example_from_off ${TBB_LIBRARIES})
endif()
- add_test(alphapoints ${CMAKE_CURRENT_BINARY_DIR}/alphapoints)
- # Do not forget to copy test files in current binary dir
- file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
- add_test(alphaoffreader_doc_60 ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader alphacomplexdoc.off 60.0 ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_60.txt)
- add_test(alphaoffreader_doc_32 ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader alphacomplexdoc.off 32.0 ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_32.txt)
+ add_test(NAME Alpha_complex_example_from_points COMMAND $<TARGET_FILE:Alpha_complex_example_from_points>)
+
+ add_test(NAME Alpha_complex_example_from_off_60 COMMAND $<TARGET_FILE:Alpha_complex_example_from_off>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "60.0" "${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_60.txt")
+ add_test(NAME Alpha_complex_example_from_off_32 COMMAND $<TARGET_FILE:Alpha_complex_example_from_off>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "32.0" "${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_32.txt")
if (DIFF_PATH)
# Do not forget to copy test results files in current binary dir
file(COPY "alphaoffreader_for_doc_32.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
file(COPY "alphaoffreader_for_doc_60.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
- 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)
+ add_test(Alpha_complex_example_from_off_60_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_60.txt ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_for_doc_60.txt)
+ add_test(Alpha_complex_example_from_off_32_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_result_32.txt ${CMAKE_CURRENT_BINARY_DIR}/alphaoffreader_for_doc_32.txt)
endif()
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt
index 32091196..d7f49b53 100644
--- a/src/Alpha_complex/test/CMakeLists.txt
+++ b/src/Alpha_complex/test/CMakeLists.txt
@@ -1,28 +1,19 @@
cmake_minimum_required(VERSION 2.6)
project(Alpha_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
- add_executable ( AlphaComplexUT Alpha_complex_unit_test.cpp )
- target_link_libraries(AlphaComplexUT ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+ include(GUDHI_test_coverage)
+
+ add_executable ( Alpha_complex_test_unit Alpha_complex_unit_test.cpp )
+ target_link_libraries(Alpha_complex_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(AlphaComplexUT ${TBB_LIBRARIES})
+ target_link_libraries(Alpha_complex_test_unit ${TBB_LIBRARIES})
endif()
# Do not forget to copy test files in current binary dir
file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
- add_test(AlphaComplexUT ${CMAKE_CURRENT_BINARY_DIR}/AlphaComplexUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/AlphaComplexUT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Alpha_complex_test_unit)
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
diff --git a/src/Alpha_complex/test/README b/src/Alpha_complex/test/README
index 45b87d91..0e5b9eb1 100644
--- a/src/Alpha_complex/test/README
+++ b/src/Alpha_complex/test/README
@@ -7,6 +7,6 @@ make
To launch with details:
***********************
-./AlphaComplexUnitTest --report_level=detailed --log_level=all
+./Alpha_complex_unit_test --report_level=detailed --log_level=all
==> echo $? returns 0 in case of success (non-zero otherwise)
diff --git a/src/Bitmap_cubical_complex/example/CMakeLists.txt b/src/Bitmap_cubical_complex/example/CMakeLists.txt
index 97a45190..241a11e5 100644
--- a/src/Bitmap_cubical_complex/example/CMakeLists.txt
+++ b/src/Bitmap_cubical_complex/example/CMakeLists.txt
@@ -7,24 +7,19 @@ if (TBB_FOUND)
target_link_libraries(Bitmap_cubical_complex ${TBB_LIBRARIES})
endif()
-# Do not forget to copy test files in current binary dir
-file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalOneSphere.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalTwoSphere.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+add_test(NAME Bitmap_cubical_complex_example_persistence_one_sphere COMMAND $<TARGET_FILE:Bitmap_cubical_complex>
+ "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalOneSphere.txt")
-add_test(Bitmap_cubical_complex_one_sphere
- ${CMAKE_CURRENT_BINARY_DIR}/Bitmap_cubical_complex
- ${CMAKE_CURRENT_BINARY_DIR}/CubicalOneSphere.txt)
-
-add_test(Bitmap_cubical_complex_two_sphere
- ${CMAKE_CURRENT_BINARY_DIR}/Bitmap_cubical_complex
- ${CMAKE_CURRENT_BINARY_DIR}/CubicalTwoSphere.txt)
+add_test(NAME Bitmap_cubical_complex_example_persistence_two_sphere COMMAND $<TARGET_FILE:Bitmap_cubical_complex>
+ "${CMAKE_SOURCE_DIR}/data/bitmap/CubicalTwoSphere.txt")
add_executable ( Random_bitmap_cubical_complex Random_bitmap_cubical_complex.cpp )
target_link_libraries(Random_bitmap_cubical_complex ${Boost_SYSTEM_LIBRARY})
if (TBB_FOUND)
target_link_libraries(Random_bitmap_cubical_complex ${TBB_LIBRARIES})
endif()
-add_test(Random_bitmap_cubical_complex ${CMAKE_CURRENT_BINARY_DIR}/Random_bitmap_cubical_complex 2 100 100)
+add_test(NAME Bitmap_cubical_complex_example_random COMMAND $<TARGET_FILE:Random_bitmap_cubical_complex>
+ "2" "100" "100")
add_executable ( Bitmap_cubical_complex_periodic_boundary_conditions Bitmap_cubical_complex_periodic_boundary_conditions.cpp )
target_link_libraries(Bitmap_cubical_complex_periodic_boundary_conditions ${Boost_SYSTEM_LIBRARY})
@@ -32,14 +27,10 @@ if (TBB_FOUND)
target_link_libraries(Bitmap_cubical_complex_periodic_boundary_conditions ${TBB_LIBRARIES})
endif()
-# Do not forget to copy test files in current binary dir
-file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/2d_torus.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-file(COPY "${CMAKE_SOURCE_DIR}/data/bitmap/3d_torus.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-
-add_test(Bitmap_cubical_complex_periodic_2d_torus
- ${CMAKE_CURRENT_BINARY_DIR}/Bitmap_cubical_complex_periodic_boundary_conditions
- ${CMAKE_CURRENT_BINARY_DIR}/2d_torus.txt)
-add_test(Bitmap_cubical_complex_periodic_3d_torus
- ${CMAKE_CURRENT_BINARY_DIR}/Bitmap_cubical_complex_periodic_boundary_conditions
- ${CMAKE_CURRENT_BINARY_DIR}/3d_torus.txt)
+add_test(NAME Bitmap_cubical_complex_example_periodic_boundary_conditions_2d_torus
+ COMMAND $<TARGET_FILE:Bitmap_cubical_complex_periodic_boundary_conditions>
+ "${CMAKE_SOURCE_DIR}/data/bitmap/2d_torus.txt")
+add_test(NAME Bitmap_cubical_complex_example_periodic_boundary_conditions_3d_torus
+ COMMAND $<TARGET_FILE:Bitmap_cubical_complex_periodic_boundary_conditions>
+ "${CMAKE_SOURCE_DIR}/data/bitmap/3d_torus.txt")
diff --git a/src/Bitmap_cubical_complex/test/CMakeLists.txt b/src/Bitmap_cubical_complex/test/CMakeLists.txt
index daf0e14f..b2895f85 100644
--- a/src/Bitmap_cubical_complex/test/CMakeLists.txt
+++ b/src/Bitmap_cubical_complex/test/CMakeLists.txt
@@ -1,24 +1,12 @@
cmake_minimum_required(VERSION 2.6)
project(Bitmap_cubical_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
-add_executable ( BitmapCCUT Bitmap_test.cpp )
-target_link_libraries(BitmapCCUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Bitmap_cubical_complex_test_unit Bitmap_test.cpp )
+target_link_libraries(Bitmap_cubical_complex_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(BitmapCCUT ${TBB_LIBRARIES})
+ target_link_libraries(Bitmap_cubical_complex_test_unit ${TBB_LIBRARIES})
endif()
-# Unitary tests
-add_test(NAME BitmapCCUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/BitmapCCUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/BitmapCCUT.xml --log_level=test_suite --report_level=no)
-
+gudhi_add_coverage_test(Bitmap_cubical_complex_test_unit)
diff --git a/src/Bottleneck_distance/example/CMakeLists.txt b/src/Bottleneck_distance/example/CMakeLists.txt
index b0a19f8b..0d0bff45 100644
--- a/src/Bottleneck_distance/example/CMakeLists.txt
+++ b/src/Bottleneck_distance/example/CMakeLists.txt
@@ -5,8 +5,6 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
add_executable (bottleneck_read_file_example bottleneck_read_file_example.cpp)
add_executable (bottleneck_basic_example bottleneck_basic_example.cpp)
- add_test(bottleneck_basic_example ${CMAKE_CURRENT_BINARY_DIR}/bottleneck_basic_example)
-
add_executable (alpha_rips_persistence_bottleneck_distance alpha_rips_persistence_bottleneck_distance.cpp)
target_link_libraries(alpha_rips_persistence_bottleneck_distance ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY})
if (TBB_FOUND)
@@ -14,7 +12,11 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
target_link_libraries(bottleneck_basic_example ${TBB_LIBRARIES})
target_link_libraries(alpha_rips_persistence_bottleneck_distance ${TBB_LIBRARIES})
endif(TBB_FOUND)
- add_test(alpha_rips_persistence_bottleneck_distance ${CMAKE_CURRENT_BINARY_DIR}/alpha_rips_persistence_bottleneck_distance
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -r 0.15 -m 0.12 -d 3 -p 3)
+
+ add_test(NAME Bottleneck_distance_example_basic COMMAND $<TARGET_FILE:bottleneck_basic_example>)
+
+ add_test(NAME Bottleneck_distance_example_alpha_rips_persistence_bottleneck
+ COMMAND $<TARGET_FILE:alpha_rips_persistence_bottleneck_distance>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.15" "-m" "0.12" "-d" "3" "-p" "3")
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Bottleneck_distance/test/CMakeLists.txt b/src/Bottleneck_distance/test/CMakeLists.txt
index 3d8e1f95..e1bbbbec 100644
--- a/src/Bottleneck_distance/test/CMakeLists.txt
+++ b/src/Bottleneck_distance/test/CMakeLists.txt
@@ -1,25 +1,15 @@
cmake_minimum_required(VERSION 2.6)
project(Bottleneck_distance_tests)
-
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
- add_executable ( bottleneckUT bottleneck_unit_test.cpp )
- target_link_libraries(bottleneckUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+ include(GUDHI_test_coverage)
+
+ add_executable ( Bottleneck_distance_test_unit bottleneck_unit_test.cpp )
+ target_link_libraries(Bottleneck_distance_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(bottleneckUT ${TBB_LIBRARIES})
+ target_link_libraries(Bottleneck_distance_test_unit ${TBB_LIBRARIES})
endif(TBB_FOUND)
- # Unitary tests
- add_test(NAME bottleneckUT COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bottleneckUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/bottleneckUT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Bottleneck_distance_test_unit)
+
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Bottleneck_distance/test/README b/src/Bottleneck_distance/test/README
index 0e7b8673..00bd9a91 100644
--- a/src/Bottleneck_distance/test/README
+++ b/src/Bottleneck_distance/test/README
@@ -7,6 +7,6 @@ make
To launch with details:
***********************
-./BottleneckUnitTest --report_level=detailed --log_level=all
+./Bottleneck_distance_unit_test --report_level=detailed --log_level=all
==> echo $? returns 0 in case of success (non-zero otherwise)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 708f3649..ebcb6888 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,12 +9,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
# For "make doxygen"
set(GUDHI_USER_VERSION_DIR ${CMAKE_SOURCE_DIR})
-include(${CMAKE_MODULE_PATH}/GUDHI_doxygen_target.txt)
+include(GUDHI_doxygen_target)
# This variable is used by Cython CMakeLists.txt to know its path
set(GUDHI_CYTHON_PATH "cython")
# For third parties libraries management - To be done last as CGAL updates CMAKE_MODULE_PATH
-include("${CMAKE_MODULE_PATH}/GUDHI_third_party_libraries.txt")
+include(GUDHI_third_party_libraries)
if(MSVC)
# Turn off some VC++ warnings
diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt
index 4c09a0a7..51a6832d 100644
--- a/src/Contraction/example/CMakeLists.txt
+++ b/src/Contraction/example/CMakeLists.txt
@@ -9,7 +9,10 @@ target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBR
target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-add_test(RipsContraction.tore3D.0.2 ${CMAKE_CURRENT_BINARY_DIR}/RipsContraction ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 0.2)
+add_test(NAME Contraction_example_tore3D_0.2 COMMAND $<TARGET_FILE:RipsContraction>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0.2")
# TODO(DS) : These tests are too long under Windows
-#add_test(RipsContraction.sphere.0.2 ${CMAKE_CURRENT_BINARY_DIR}/RipsContraction ${CMAKE_SOURCE_DIR}/data/points/sphere3D_2646.off 0.2)
-#add_test(RipsContraction.S0310000 ${CMAKE_CURRENT_BINARY_DIR}/RipsContraction ${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off 0.3)
+#add_test(NAME Contraction_example_sphere_0.2 COMMAND $<TARGET_FILE:RipsContraction>
+# "${CMAKE_SOURCE_DIR}/data/points/sphere3D_2646.off" "0.2")
+#add_test(NAME Contraction_example_SO3_0.3 COMMAND $<TARGET_FILE:RipsContraction>
+# "${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off" "0.3")
diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt
index a6b698c3..3c45e79b 100644
--- a/src/Persistent_cohomology/example/CMakeLists.txt
+++ b/src/Persistent_cohomology/example/CMakeLists.txt
@@ -32,20 +32,21 @@ if (TBB_FOUND)
target_link_libraries(persistence_from_file ${TBB_LIBRARIES})
endif()
-add_test(plain_homology ${CMAKE_CURRENT_BINARY_DIR}/plain_homology)
-add_test(persistence_from_simple_simplex_tree ${CMAKE_CURRENT_BINARY_DIR}/persistence_from_simple_simplex_tree 1 0)
-add_test(rips_distance_matrix ${CMAKE_CURRENT_BINARY_DIR}/rips_distance_matrix_persistence
- ${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv -r 1.0 -d 3 -p 3 -m 0)
-add_test(rips_persistence_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3)
-add_test(rips_persistence_step_by_step_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence_step_by_step
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 3)
-add_test(rips_persistence_via_boundary_matrix_3 ${CMAKE_CURRENT_BINARY_DIR}/rips_persistence_via_boundary_matrix
- ${CMAKE_SOURCE_DIR}/data/points/Kl.off -r 0.16 -d 3 -p 3 -m 100)
-add_test(persistence_from_file_3_2_0 ${CMAKE_CURRENT_BINARY_DIR}/persistence_from_file
- ${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/bunny_5000_complex.fsc -p 2 -m 0)
-add_test(persistence_from_file_3_3_100 ${CMAKE_CURRENT_BINARY_DIR}/persistence_from_file
- ${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/bunny_5000_complex.fsc -p 3 -m 100)
+add_test(NAME Persistent_cohomology_example_plain_homology COMMAND $<TARGET_FILE:plain_homology>)
+add_test(NAME Persistent_cohomology_example_from_simple_simplex_tree COMMAND $<TARGET_FILE:persistence_from_simple_simplex_tree>
+ "1" "0")
+add_test(NAME Persistent_cohomology_example_from_rips_distance_matrix COMMAND $<TARGET_FILE:rips_distance_matrix_persistence>
+ "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "-r" "1.0" "-d" "3" "-p" "3" "-m" "0")
+add_test(NAME Persistent_cohomology_example_from_rips_on_tore_3D COMMAND $<TARGET_FILE:rips_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3")
+add_test(NAME Persistent_cohomology_example_from_rips_step_by_step_on_tore_3D COMMAND $<TARGET_FILE:rips_persistence_step_by_step>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "3")
+add_test(NAME Persistent_cohomology_example_via_boundary_matrix COMMAND $<TARGET_FILE:rips_persistence_via_boundary_matrix>
+ "${CMAKE_SOURCE_DIR}/data/points/Kl.off" "-r" "0.16" "-d" "3" "-p" "3" "-m" "100")
+add_test(NAME Persistent_cohomology_example_from_file_3_2_0 COMMAND $<TARGET_FILE:persistence_from_file>
+ "${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/bunny_5000_complex.fsc" "-p" "2" "-m" "0")
+add_test(NAME Persistent_cohomology_example_from_file_3_3_100 COMMAND $<TARGET_FILE:persistence_from_file>
+ "${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/bunny_5000_complex.fsc" "-p" "3" "-m" "100")
if(GMP_FOUND)
if(GMPXX_FOUND)
@@ -55,8 +56,8 @@ if(GMP_FOUND)
if (TBB_FOUND)
target_link_libraries(rips_multifield_persistence ${TBB_LIBRARIES})
endif(TBB_FOUND)
- add_test(rips_multifield_persistence_2_71 ${CMAKE_CURRENT_BINARY_DIR}/rips_multifield_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -r 0.25 -m 0.5 -d 3 -p 2 -q 71)
+ add_test(NAME Persistent_cohomology_example_multifield_2_71 COMMAND $<TARGET_FILE:rips_multifield_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-r" "0.25" "-m" "0.5" "-d" "3" "-p" "2" "-q" "71")
endif(GMPXX_FOUND)
endif(GMP_FOUND)
@@ -73,13 +74,12 @@ if(CGAL_FOUND)
target_link_libraries(exact_alpha_complex_3d_persistence ${TBB_LIBRARIES})
target_link_libraries(weighted_alpha_complex_3d_persistence ${TBB_LIBRARIES})
endif(TBB_FOUND)
- add_test(alpha_complex_3d_persistence_2_0_5 ${CMAKE_CURRENT_BINARY_DIR}/alpha_complex_3d_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off 2 0.45)
- add_test(exact_alpha_complex_3d_persistence_2_0_5 ${CMAKE_CURRENT_BINARY_DIR}/exact_alpha_complex_3d_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off 2 0.45)
- add_test(weighted_alpha_complex_3d_persistence_2_0_5 ${CMAKE_CURRENT_BINARY_DIR}/weighted_alpha_complex_3d_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.weights 2 0.45)
-
+ add_test(NAME Persistent_cohomology_example_alpha_complex_3d COMMAND $<TARGET_FILE:alpha_complex_3d_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45")
+ add_test(NAME Persistent_cohomology_example_exact_alpha_complex_3d COMMAND $<TARGET_FILE:exact_alpha_complex_3d_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "2" "0.45")
+ add_test(NAME Persistent_cohomology_example_weighted_alpha_complex_3d COMMAND $<TARGET_FILE:weighted_alpha_complex_3d_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.weights" "2" "0.45")
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
add_executable (alpha_complex_persistence alpha_complex_persistence.cpp)
@@ -97,10 +97,10 @@ if(CGAL_FOUND)
target_link_libraries(periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES})
target_link_libraries(custom_persistence_sort ${TBB_LIBRARIES})
endif(TBB_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)
+ add_test(NAME Persistent_cohomology_example_alpha_complex COMMAND $<TARGET_FILE:alpha_complex_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-p" "2" "-m" "0.45")
+ add_test(NAME Persistent_cohomology_example_periodic_alpha_complex_3d COMMAND $<TARGET_FILE: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(NAME Persistent_cohomology_example_custom_persistence_sort COMMAND $<TARGET_FILE:custom_persistence_sort>)
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
endif(CGAL_FOUND)
diff --git a/src/Persistent_cohomology/test/CMakeLists.txt b/src/Persistent_cohomology/test/CMakeLists.txt
index a21f39c4..11e9a951 100644
--- a/src/Persistent_cohomology/test/CMakeLists.txt
+++ b/src/Persistent_cohomology/test/CMakeLists.txt
@@ -1,49 +1,37 @@
cmake_minimum_required(VERSION 2.6)
project(Persistent_cohomology_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif(GCOVR_PATH)
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif(GPROF_PATH)
-
-add_executable ( PersistentCohomologyUT persistent_cohomology_unit_test.cpp )
-target_link_libraries(PersistentCohomologyUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-add_executable ( BettiNumbersUT betti_numbers_unit_test.cpp )
-target_link_libraries(BettiNumbersUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+include(GUDHI_test_coverage)
+
+add_executable ( Persistent_cohomology_test_unit persistent_cohomology_unit_test.cpp )
+target_link_libraries(Persistent_cohomology_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Persistent_cohomology_test_betti_numbers betti_numbers_unit_test.cpp )
+target_link_libraries(Persistent_cohomology_test_betti_numbers ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(PersistentCohomologyUT ${TBB_LIBRARIES})
- target_link_libraries(BettiNumbersUT ${TBB_LIBRARIES})
+ target_link_libraries(Persistent_cohomology_test_unit ${TBB_LIBRARIES})
+ target_link_libraries(Persistent_cohomology_test_betti_numbers ${TBB_LIBRARIES})
endif(TBB_FOUND)
-# Unitary tests
-add_test(NAME PersistentCohomologyUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/PersistentCohomologyUT
- ${CMAKE_SOURCE_DIR}/src/Persistent_cohomology/test/simplex_tree_file_for_unit_test.txt
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/PersistentCohomologyUT.xml --log_level=test_suite --report_level=no)
+# Do not forget to copy test results files in current binary dir
+file(COPY "${CMAKE_SOURCE_DIR}/src/Persistent_cohomology/test/simplex_tree_file_for_unit_test.txt"
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-add_test(NAME BettiNumbersUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/BettiNumbersUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/BettiNumbersUT.xml --log_level=test_suite --report_level=no)
+# Unitary tests
+gudhi_add_coverage_test(Persistent_cohomology_test_unit)
+gudhi_add_coverage_test(Persistent_cohomology_test_betti_numbers)
if(GMPXX_FOUND AND GMP_FOUND)
- add_executable ( PersistentCohomologyMultiFieldUT persistent_cohomology_unit_test_multi_field.cpp )
- target_link_libraries(PersistentCohomologyMultiFieldUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
+ add_executable ( Persistent_cohomology_test_unit_multi_field persistent_cohomology_unit_test_multi_field.cpp )
+ target_link_libraries(Persistent_cohomology_test_unit_multi_field ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
if (TBB_FOUND)
- target_link_libraries(PersistentCohomologyMultiFieldUT ${TBB_LIBRARIES})
+ target_link_libraries(Persistent_cohomology_test_unit_multi_field ${TBB_LIBRARIES})
endif(TBB_FOUND)
+ # Do not forget to copy test results files in current binary dir
+ file(COPY "${CMAKE_SOURCE_DIR}/src/Persistent_cohomology/test/simplex_tree_file_for_multi_field_unit_test.txt"
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
# Unitary tests
- add_test(NAME PersistentCohomologyMultiFieldUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/PersistentCohomologyMultiFieldUT
- ${CMAKE_SOURCE_DIR}/src/Persistent_cohomology/test/simplex_tree_file_for_multi_field_unit_test.txt
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/PersistentCohomologyMultiFieldUT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Persistent_cohomology_test_unit_multi_field)
endif(GMPXX_FOUND AND GMP_FOUND)
diff --git a/src/Persistent_cohomology/test/README b/src/Persistent_cohomology/test/README
index 6c64b5fe..0c41feed 100644
--- a/src/Persistent_cohomology/test/README
+++ b/src/Persistent_cohomology/test/README
@@ -11,13 +11,19 @@ To launch with details:
SINGLE FIELD
------------
-./PersistentCohomologyUT simplex_tree_file_for_unit_test.txt --report_level=detailed --log_level=all
+./Persistent_cohomology_test_unit --report_level=detailed --log_level=all
==> echo $? returns 0 in case of success (non-zero otherwise)
MULTI FIELD
-----------
-./PersistentCohomologyMultiFieldUT simplex_tree_file_for_multi_field_unit_test.txt --report_level=detailed --log_level=all
+./Persistent_cohomology_test_unit_multi_field --report_level=detailed --log_level=all
+
+ ==> echo $? returns 0 in case of success (non-zero otherwise)
+
+BETTI NUMBERS
+-------------
+./Persistent_cohomology_test_betti_numbers --report_level=detailed --log_level=all
==> echo $? returns 0 in case of success (non-zero otherwise)
diff --git a/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp b/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
index e2e0bc71..f8174020 100644
--- a/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
+++ b/src/Persistent_cohomology/test/persistent_cohomology_unit_test.cpp
@@ -22,11 +22,9 @@ using namespace boost::unit_test;
typedef Simplex_tree<> typeST;
std::string test_rips_persistence(int coefficient, int min_persistence) {
- // file name is given as parameter from CMakeLists.txt
- const std::string inputFile(framework::master_test_suite().argv[1]);
-
+ // file is copied in CMakeLists.txt
std::ifstream simplex_tree_stream;
- simplex_tree_stream.open(inputFile.c_str());
+ simplex_tree_stream.open("simplex_tree_file_for_unit_test.txt");
typeST st;
simplex_tree_stream >> st;
simplex_tree_stream.close();
diff --git a/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp b/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
index 6a7ecbec..3537cfa4 100644
--- a/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
+++ b/src/Persistent_cohomology/test/persistent_cohomology_unit_test_multi_field.cpp
@@ -22,11 +22,9 @@ using namespace boost::unit_test;
typedef Simplex_tree<> typeST;
std::string test_rips_persistence(int min_coefficient, int max_coefficient, double min_persistence) {
- // file name is given as parameter from CMakeLists.txt
- const std::string inputFile(framework::master_test_suite().argv[1]);
-
+ // file is copied in CMakeLists.txt
std::ifstream simplex_tree_stream;
- simplex_tree_stream.open(inputFile.c_str());
+ simplex_tree_stream.open("simplex_tree_file_for_multi_field_unit_test.txt");
typeST st;
simplex_tree_stream >> st;
simplex_tree_stream.close();
diff --git a/src/Rips_complex/doc/Intro_rips_complex.h b/src/Rips_complex/doc/Intro_rips_complex.h
index 8e374c09..124dfec9 100644
--- a/src/Rips_complex/doc/Intro_rips_complex.h
+++ b/src/Rips_complex/doc/Intro_rips_complex.h
@@ -77,7 +77,7 @@ namespace rips_complex {
* When launching (Rips maximal distance between 2 points is 12.0, is expanded until dimension 1 - one skeleton graph
* in other words):
*
- * \code $> ./oneskeletonripspoints
+ * \code $> ./Rips_complex_example_one_skeleton_from_points
* \endcode
*
* the program output is:
@@ -97,7 +97,7 @@ namespace rips_complex {
*
* When launching:
*
- * \code $> ./ripsoffreader ../../data/points/alphacomplexdoc.off 12.0 3
+ * \code $> ./Rips_complex_example_from_off ../../data/points/alphacomplexdoc.off 12.0 3
* \endcode
*
* the program output is:
@@ -120,7 +120,7 @@ namespace rips_complex {
* When launching (Rips maximal distance between 2 points is 1.0, is expanded until dimension 1 - one skeleton graph
* with other words):
*
- * \code $> ./oneskeletonripsdistance
+ * \code $> ./Rips_complex_example_one_skeleton_from_distance_matrix
* \endcode
*
* the program output is:
@@ -139,7 +139,7 @@ namespace rips_complex {
*
* When launching:
*
- * \code $> ./ripscsvdistancereader ../../data/distance_matrix/full_square_distance_matrix.csv 1.0 3
+ * \code $> ./Rips_complex_example_from_csv_distance_matrix ../../data/distance_matrix/full_square_distance_matrix.csv 1.0 3
* \endcode
*
* the program output is:
diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt
index 070ac710..8aee79e2 100644
--- a/src/Rips_complex/example/CMakeLists.txt
+++ b/src/Rips_complex/example/CMakeLists.txt
@@ -2,37 +2,40 @@ cmake_minimum_required(VERSION 2.6)
project(Rips_complex_examples)
# Point cloud
-add_executable ( ripsoffreader example_rips_complex_from_off_file.cpp )
-target_link_libraries(ripsoffreader ${Boost_SYSTEM_LIBRARY})
+add_executable ( Rips_complex_example_from_off example_rips_complex_from_off_file.cpp )
+target_link_libraries(Rips_complex_example_from_off ${Boost_SYSTEM_LIBRARY})
-add_executable ( oneskeletonripspoints example_one_skeleton_rips_from_points.cpp )
-target_link_libraries(oneskeletonripspoints ${Boost_SYSTEM_LIBRARY})
+add_executable ( Rips_complex_example_one_skeleton_from_points example_one_skeleton_rips_from_points.cpp )
+target_link_libraries(Rips_complex_example_one_skeleton_from_points ${Boost_SYSTEM_LIBRARY})
# Distance matrix
-add_executable ( oneskeletonripsdistance example_one_skeleton_rips_from_distance_matrix.cpp )
-target_link_libraries(oneskeletonripsdistance ${Boost_SYSTEM_LIBRARY})
+add_executable ( Rips_complex_example_one_skeleton_from_distance_matrix example_one_skeleton_rips_from_distance_matrix.cpp )
+target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${Boost_SYSTEM_LIBRARY})
-add_executable ( ripscsvdistancereader example_rips_complex_from_csv_distance_matrix_file.cpp )
-target_link_libraries(ripscsvdistancereader ${Boost_SYSTEM_LIBRARY})
+add_executable ( Rips_complex_example_from_csv_distance_matrix example_rips_complex_from_csv_distance_matrix_file.cpp )
+target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${Boost_SYSTEM_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(ripsoffreader ${TBB_LIBRARIES})
- target_link_libraries(oneskeletonripspoints ${TBB_LIBRARIES})
- target_link_libraries(oneskeletonripsdistance ${TBB_LIBRARIES})
- target_link_libraries(ripscsvdistancereader ${TBB_LIBRARIES})
+ target_link_libraries(Rips_complex_example_from_off ${TBB_LIBRARIES})
+ target_link_libraries(Rips_complex_example_one_skeleton_from_points ${TBB_LIBRARIES})
+ target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${TBB_LIBRARIES})
+ target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${TBB_LIBRARIES})
endif()
-add_test(oneskeletonripspoints ${CMAKE_CURRENT_BINARY_DIR}/oneskeletonripspoints)
-add_test(oneskeletonripsdistance ${CMAKE_CURRENT_BINARY_DIR}/oneskeletonripsdistance)
+add_test(NAME Rips_complex_example_one_skeleton_from_points
+ COMMAND $<TARGET_FILE:Rips_complex_example_one_skeleton_from_points>)
+add_test(NAME Rips_complex_example_one_skeleton_from_distance_matrix
+ COMMAND $<TARGET_FILE:Rips_complex_example_one_skeleton_from_distance_matrix>)
-# Do not forget to copy test files in current binary dir
-file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-add_test(ripsoffreader_doc_12_1 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader alphacomplexdoc.off 12.0 1 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt)
-add_test(ripsoffreader_doc_12_3 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader alphacomplexdoc.off 12.0 3 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt)
+add_test(NAME Rips_complex_example_from_off_doc_12_1 COMMAND $<TARGET_FILE:Rips_complex_example_from_off>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "12.0" "1" "${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt")
+add_test(NAME Rips_complex_example_from_off_doc_12_3 COMMAND $<TARGET_FILE:Rips_complex_example_from_off>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" "12.0" "3" "${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt")
-file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-add_test(ripscsvdistancereader_doc_12_1 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvdistancereader full_square_distance_matrix.csv 12.0 1 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt)
-add_test(ripscsvdistancereader_doc_12_3 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvdistancereader full_square_distance_matrix.csv 12.0 3 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt)
+add_test(NAME Rips_complex_example_from_csv_distance_matrix_doc_12_1 COMMAND $<TARGET_FILE:Rips_complex_example_from_csv_distance_matrix>
+ "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "12.0" "1" "${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt")
+add_test(NAME Rips_complex_example_from_csv_distance_matrix_doc_12_3 COMMAND $<TARGET_FILE:Rips_complex_example_from_csv_distance_matrix>
+ "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" "12.0" "3" "${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt")
if (DIFF_PATH)
@@ -40,8 +43,16 @@ if (DIFF_PATH)
file(COPY "one_skeleton_rips_for_doc.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
file(COPY "full_skeleton_rips_for_doc.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
- add_test(ripsoffreader_doc_12_1_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
- add_test(ripsoffreader_doc_12_3_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
- add_test(ripscsvreader_doc_12_1_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
- add_test(ripscsvreader_doc_12_3_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
+ add_test(Rips_complex_example_from_off_doc_12_1_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
+ add_test(Rips_complex_example_from_off_doc_12_3_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
+ add_test(Rips_complex_example_from_csv_distance_matrix_doc_12_1_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
+ add_test(Rips_complex_example_from_csv_distance_matrix_doc_12_3_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
endif()
diff --git a/src/Rips_complex/test/CMakeLists.txt b/src/Rips_complex/test/CMakeLists.txt
index 87bad2ed..57f780f1 100644
--- a/src/Rips_complex/test/CMakeLists.txt
+++ b/src/Rips_complex/test/CMakeLists.txt
@@ -1,25 +1,16 @@
cmake_minimum_required(VERSION 2.6)
project(Rips_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
-add_executable ( rips_complex_UT test_rips_complex.cpp )
-target_link_libraries(rips_complex_UT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Rips_complex_test_unit test_rips_complex.cpp )
+target_link_libraries(Rips_complex_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(rips_complex_UT ${TBB_LIBRARIES})
+ target_link_libraries(Rips_complex_test_unit ${TBB_LIBRARIES})
endif()
# Do not forget to copy test files in current binary dir
file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-add_test(rips_complex_UT ${CMAKE_CURRENT_BINARY_DIR}/rips_complex_UT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/rips_complex_UT.xml --log_level=test_suite --report_level=no)
+gudhi_add_coverage_test(Rips_complex_test_unit)
diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt
index e5285591..b1ea98d4 100644
--- a/src/Simplex_tree/example/CMakeLists.txt
+++ b/src/Simplex_tree/example/CMakeLists.txt
@@ -1,33 +1,32 @@
cmake_minimum_required(VERSION 2.6)
project(Simplex_tree_examples)
-add_executable ( simplex_tree_from_cliques_of_graph simplex_tree_from_cliques_of_graph.cpp )
+add_executable ( Simplex_tree_example_from_cliques_of_graph simplex_tree_from_cliques_of_graph.cpp )
if (TBB_FOUND)
- target_link_libraries(simplex_tree_from_cliques_of_graph ${TBB_LIBRARIES})
+ target_link_libraries(Simplex_tree_example_from_cliques_of_graph ${TBB_LIBRARIES})
endif()
-add_test(simplex_tree_from_cliques_of_graph_2 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_cliques_of_graph
- ${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/Klein_bottle_complex.fsc 2)
-add_test(simplex_tree_from_cliques_of_graph_3 ${CMAKE_CURRENT_BINARY_DIR}/simplex_tree_from_cliques_of_graph
- ${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/Klein_bottle_complex.fsc 3)
+add_test(NAME Simplex_tree_example_from_cliques_of_graph_2 COMMAND $<TARGET_FILE:Simplex_tree_example_from_cliques_of_graph>
+ "${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/Klein_bottle_complex.fsc" "2")
+add_test(NAME Simplex_tree_example_from_cliques_of_graph_3 COMMAND $<TARGET_FILE:Simplex_tree_example_from_cliques_of_graph>
+ "${CMAKE_SOURCE_DIR}/data/filtered_simplicial_complex/Klein_bottle_complex.fsc" "3")
-add_executable ( simple_simplex_tree simple_simplex_tree.cpp )
+add_executable ( Simplex_tree_example_simple_simplex_tree simple_simplex_tree.cpp )
if (TBB_FOUND)
- target_link_libraries(simple_simplex_tree ${TBB_LIBRARIES})
+ target_link_libraries(Simplex_tree_example_simple_simplex_tree ${TBB_LIBRARIES})
endif()
-add_test(simple_simplex_tree ${CMAKE_CURRENT_BINARY_DIR}/simple_simplex_tree)
+add_test(NAME Simplex_tree_example_simple_simplex_tree COMMAND $<TARGET_FILE:Simplex_tree_example_simple_simplex_tree>)
-add_executable ( mini_simplex_tree mini_simplex_tree.cpp )
-add_test(mini_simplex_tree ${CMAKE_CURRENT_BINARY_DIR}/mini_simplex_tree)
+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)
- add_executable ( alpha_shapes_3_simplex_tree_from_off_file example_alpha_shapes_3_simplex_tree_from_off_file.cpp )
- target_link_libraries(alpha_shapes_3_simplex_tree_from_off_file ${GMP_LIBRARIES} ${CGAL_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+ 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} ${Boost_SYSTEM_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(alpha_shapes_3_simplex_tree_from_off_file ${TBB_LIBRARIES})
+ target_link_libraries(Simplex_tree_example_alpha_shapes_3_from_off ${TBB_LIBRARIES})
endif()
- add_test(alpha_shapes_3_simplex_tree_from_off_file
- ${CMAKE_CURRENT_BINARY_DIR}/alpha_shapes_3_simplex_tree_from_off_file
- ${CMAKE_SOURCE_DIR}/data/points/bunny_5000.off)
+ add_test(NAME Simplex_tree_example_alpha_shapes_3_from_off COMMAND $<TARGET_FILE:Simplex_tree_example_alpha_shapes_3_from_off>
+ "${CMAKE_SOURCE_DIR}/data/points/bunny_5000.off")
endif()
diff --git a/src/Simplex_tree/example/README b/src/Simplex_tree/example/README
index e37af790..a9498173 100644
--- a/src/Simplex_tree/example/README
+++ b/src/Simplex_tree/example/README
@@ -10,7 +10,7 @@ Example of use :
*** Simple simplex tree construction
-./simple_simplex_tree
+./Simplex_tree_example_simple_simplex_tree
********************************************************************
EXAMPLE OF SIMPLE INSERTION
@@ -52,7 +52,7 @@ EXAMPLE OF SIMPLE INSERTION
*** Simplex tree construction with Z/2Z coefficients on weighted graph Klein bottle file:
-./simplex_tree_from_cliques_of_graph ../../../data/points/Klein_bottle_complex.txt 2
+./Simplex_tree_example_from_cliques_of_graph ../../../data/points/Klein_bottle_complex.txt 2
Insert the 1-skeleton in the simplex tree in 0 s.
Expand the simplex tree in 0 s.
Information of the Simplex Tree:
@@ -60,7 +60,7 @@ Information of the Simplex Tree:
with Z/3Z coefficients:
-./simplex_tree_from_cliques_of_graph ../../../data/points/Klein_bottle_complex.txt 3
+./Simplex_tree_example_from_cliques_of_graph ../../../data/points/Klein_bottle_complex.txt 3
Insert the 1-skeleton in the simplex tree in 0 s.
Expand the simplex tree in 0 s.
@@ -70,4 +70,4 @@ Information of the Simplex Tree:
*** Simplex_tree computed and displayed from a 3D alpha complex:
[ Requires CGAL, GMP and GMPXX to be installed]
-./simplex_tree_from_alpha_shapes_3 ../../../data/points/bunny_5000
+./Simplex_tree_example_alpha_shapes_3_from_off ../../../data/points/bunny_5000
diff --git a/src/Simplex_tree/test/CMakeLists.txt b/src/Simplex_tree/test/CMakeLists.txt
index e95d0782..17b0f2c2 100644
--- a/src/Simplex_tree/test/CMakeLists.txt
+++ b/src/Simplex_tree/test/CMakeLists.txt
@@ -1,27 +1,15 @@
cmake_minimum_required(VERSION 2.6)
project(Simplex_tree_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
-add_executable ( SimplexTreeUT simplex_tree_unit_test.cpp )
-target_link_libraries(SimplexTreeUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Simplex_tree_test_unit simplex_tree_unit_test.cpp )
+target_link_libraries(Simplex_tree_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
- target_link_libraries(SimplexTreeUT ${TBB_LIBRARIES})
+ target_link_libraries(Simplex_tree_test_unit ${TBB_LIBRARIES})
endif()
# Do not forget to copy test files in current binary dir
file(COPY "simplex_tree_for_unit_test.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-# Unitary tests
-add_test(NAME SimplexTreeUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/SimplexTreeUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/SimplexTreeUT.xml --log_level=test_suite --report_level=no)
-
+gudhi_add_coverage_test(Simplex_tree_test_unit)
diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt
index cc7f37f3..c887e408 100644
--- a/src/Skeleton_blocker/example/CMakeLists.txt
+++ b/src/Skeleton_blocker/example/CMakeLists.txt
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 2.6)
project(Skeleton_blocker_examples)
-add_executable(SkeletonBlockerFromSimplices Skeleton_blocker_from_simplices.cpp)
-add_executable(SkeletonBlockerIteration Skeleton_blocker_iteration.cpp)
-add_executable(SkeletonBlockerLink Skeleton_blocker_link.cpp)
+add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_simplices.cpp)
+add_executable(Skeleton_blocker_example_iteration Skeleton_blocker_iteration.cpp)
+add_executable(Skeleton_blocker_example_link Skeleton_blocker_link.cpp)
-target_link_libraries(SkeletonBlockerIteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-add_test(SkeletonBlockerFromSimplices ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerFromSimplices)
-add_test(SkeletonBlockerIteration ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerIteration)
-add_test(SkeletonBlockerLink ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerLink)
+add_test(NAME Skeleton_blocker_example_from_simplices COMMAND $<TARGET_FILE:Skeleton_blocker_example_from_simplices>)
+add_test(NAME Skeleton_blocker_example_iteration COMMAND $<TARGET_FILE:Skeleton_blocker_example_iteration>)
+add_test(NAME Skeleton_blocker_example_link COMMAND $<TARGET_FILE:Skeleton_blocker_example_link>)
diff --git a/src/Skeleton_blocker/test/CMakeLists.txt b/src/Skeleton_blocker/test/CMakeLists.txt
index f98517f0..0887fcff 100644
--- a/src/Skeleton_blocker/test/CMakeLists.txt
+++ b/src/Skeleton_blocker/test/CMakeLists.txt
@@ -1,35 +1,18 @@
cmake_minimum_required(VERSION 2.6)
project(Skeleton_blocker_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
-add_executable ( test_skeleton_blocker_complex test_skeleton_blocker_complex.cpp )
-target_link_libraries(test_skeleton_blocker_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-add_executable ( test_skeleton_blocker_geometric_complex test_skeleton_blocker_geometric_complex.cpp )
-target_link_libraries(test_skeleton_blocker_geometric_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-add_executable ( test_skeleton_blocker_simplifiable test_skeleton_blocker_simplifiable.cpp )
-target_link_libraries(test_skeleton_blocker_simplifiable ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Skeleton_blocker_test_unit test_skeleton_blocker_complex.cpp )
+target_link_libraries(Skeleton_blocker_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Skeleton_blocker_test_geometric_complex test_skeleton_blocker_geometric_complex.cpp )
+target_link_libraries(Skeleton_blocker_test_geometric_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Skeleton_blocker_test_simplifiable test_skeleton_blocker_simplifiable.cpp )
+target_link_libraries(Skeleton_blocker_test_simplifiable ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
# Do not forget to copy test files in current binary dir
file(COPY "test2.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-# Unitary tests
-add_test(NAME test_skeleton_blocker_complex
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_skeleton_blocker_complex
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/skbl_complexUT.xml --log_level=test_suite --report_level=no)
-add_test(NAME test_skeleton_blocker_geometric_complex
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_skeleton_blocker_geometric_complex
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/skbl_geometric_complexUT.xml --log_level=test_suite --report_level=no)
-add_test(NAME test_skeleton_blocker_simplifiable
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_skeleton_blocker_simplifiable
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/skbl_simplifiableUT.xml --log_level=test_suite --report_level=no)
+gudhi_add_coverage_test(Skeleton_blocker_test_unit)
+gudhi_add_coverage_test(Skeleton_blocker_test_geometric_complex)
+gudhi_add_coverage_test(Skeleton_blocker_test_simplifiable)
diff --git a/src/Spatial_searching/example/CMakeLists.txt b/src/Spatial_searching/example/CMakeLists.txt
index 6238a0ec..f4b9f3cb 100644
--- a/src/Spatial_searching/example/CMakeLists.txt
+++ b/src/Spatial_searching/example/CMakeLists.txt
@@ -1,13 +1,9 @@
cmake_minimum_required(VERSION 2.6)
project(Spatial_searching_examples)
-if(CGAL_FOUND)
- if (NOT CGAL_VERSION VERSION_LESS 4.8.1)
- if (EIGEN3_FOUND)
- add_executable( Spatial_searching_example_spatial_searching example_spatial_searching.cpp )
- target_link_libraries(Spatial_searching_example_spatial_searching ${CGAL_LIBRARY})
- add_test(Spatial_searching_example_spatial_searching
- ${CMAKE_CURRENT_BINARY_DIR}/Spatial_searching_example_spatial_searching)
- endif()
- endif()
-endif()
+if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ add_executable( Spatial_searching_example_spatial_searching example_spatial_searching.cpp )
+ target_link_libraries(Spatial_searching_example_spatial_searching ${CGAL_LIBRARY})
+ add_test(NAME Spatial_searching_example_spatial_searching
+ COMMAND $<TARGET_FILE:Spatial_searching_example_spatial_searching>)
+endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Spatial_searching/test/CMakeLists.txt b/src/Spatial_searching/test/CMakeLists.txt
index bdc95e4a..2502ea5e 100644
--- a/src/Spatial_searching/test/CMakeLists.txt
+++ b/src/Spatial_searching/test/CMakeLists.txt
@@ -1,21 +1,12 @@
cmake_minimum_required(VERSION 2.6)
project(Spatial_searching_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ include(GUDHI_test_coverage)
+
add_executable( Spatial_searching_test_Kd_tree_search test_Kd_tree_search.cpp )
target_link_libraries(Spatial_searching_test_Kd_tree_search
${CGAL_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
- add_test(Spatial_searching_test_Kd_tree_search ${CMAKE_CURRENT_BINARY_DIR}/Spatial_searching_test_Kd_tree_search
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Spatial_searching_UT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Spatial_searching_test_Kd_tree_search)
endif ()
diff --git a/src/Subsampling/example/CMakeLists.txt b/src/Subsampling/example/CMakeLists.txt
index bb043297..71b8d2e8 100644
--- a/src/Subsampling/example/CMakeLists.txt
+++ b/src/Subsampling/example/CMakeLists.txt
@@ -8,10 +8,10 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
add_executable(Subsampling_example_sparsify_point_set example_sparsify_point_set.cpp)
target_link_libraries(Subsampling_example_sparsify_point_set ${CGAL_LIBRARY})
- add_test(Subsampling_example_pick_n_random_points
- ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_example_pick_n_random_points)
- add_test(Subsampling_example_choose_n_farthest_points
- ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_example_choose_n_farthest_points)
- add_test(Subsampling_example_sparsify_point_set
- ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_example_sparsify_point_set)
+ add_test(NAME Subsampling_example_pick_n_random_points
+ COMMAND $<TARGET_FILE:Subsampling_example_pick_n_random_points>)
+ add_test(NAME Subsampling_example_choose_n_farthest_points
+ COMMAND $<TARGET_FILE:Subsampling_example_choose_n_farthest_points>)
+ add_test(NAME Subsampling_example_sparsify_point_set
+ COMMAND $<TARGET_FILE:Subsampling_example_sparsify_point_set>)
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Subsampling/test/CMakeLists.txt b/src/Subsampling/test/CMakeLists.txt
index 5517fe9d..dbf97db3 100644
--- a/src/Subsampling/test/CMakeLists.txt
+++ b/src/Subsampling/test/CMakeLists.txt
@@ -1,16 +1,9 @@
cmake_minimum_required(VERSION 2.6)
project(Subsampling_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ include(GUDHI_test_coverage)
+
add_executable( Subsampling_test_pick_n_random_points test_pick_n_random_points.cpp )
target_link_libraries(Subsampling_test_pick_n_random_points ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
@@ -20,15 +13,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
add_executable(Subsampling_test_sparsify_point_set test_sparsify_point_set.cpp)
target_link_libraries(Subsampling_test_sparsify_point_set ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
- add_test(Subsampling_test_pick_n_random_points ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_test_pick_n_random_points
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Subsampling_test_pick_n_random_points_UT.xml --log_level=test_suite --report_level=no)
-
- add_test(Subsampling_test_choose_n_farthest_points ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_test_choose_n_farthest_points
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Subsampling_test_choose_n_farthest_points_UT.xml --log_level=test_suite --report_level=no)
-
- add_test(Subsampling_test_sparsify_point_set ${CMAKE_CURRENT_BINARY_DIR}/Subsampling_test_sparsify_point_set
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Subsampling_test_sparsify_point_set_UT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Subsampling_test_pick_n_random_points)
+ gudhi_add_coverage_test(Subsampling_test_choose_n_farthest_points)
+ gudhi_add_coverage_test(Subsampling_test_sparsify_point_set)
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Tangential_complex/example/CMakeLists.txt b/src/Tangential_complex/example/CMakeLists.txt
index 47a56e3b..339d0581 100644
--- a/src/Tangential_complex/example/CMakeLists.txt
+++ b/src/Tangential_complex/example/CMakeLists.txt
@@ -11,9 +11,8 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
target_link_libraries(Tangential_complex_example_with_perturb ${TBB_LIBRARIES})
endif(TBB_FOUND)
- add_test(Tangential_complex_example_basic
- ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_example_basic)
-
- add_test(Tangential_complex_example_with_perturb
- ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_example_with_perturb)
+ add_test(NAME Tangential_complex_example_basic
+ COMMAND $<TARGET_FILE:Tangential_complex_example_basic>)
+ add_test(NAME Tangential_complex_example_with_perturb
+ COMMAND $<TARGET_FILE:Tangential_complex_example_with_perturb>)
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt
index b2bf5dd7..fc710676 100644
--- a/src/Tangential_complex/test/CMakeLists.txt
+++ b/src/Tangential_complex/test/CMakeLists.txt
@@ -1,23 +1,14 @@
cmake_minimum_required(VERSION 2.6)
project(Tangential_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ include(GUDHI_test_coverage)
+
add_executable( Tangential_complex_test_TC test_tangential_complex.cpp )
target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
if (TBB_FOUND)
target_link_libraries(Tangential_complex_test_TC ${TBB_LIBRARIES})
endif()
- add_test(Tangential_complex_test_TC ${CMAKE_CURRENT_BINARY_DIR}/Tangential_complex_test_TC
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Tangential_complex_UT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Tangential_complex_test_TC)
endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt
index 549a85be..670651ce 100644
--- a/src/Witness_complex/example/CMakeLists.txt
+++ b/src/Witness_complex/example/CMakeLists.txt
@@ -6,7 +6,8 @@ target_link_libraries(Witness_complex_example_nearest_landmark_table ${Boost_SYS
if (TBB_FOUND)
target_link_libraries(Witness_complex_example_nearest_landmark_table ${TBB_LIBRARIES})
endif()
-add_test(Witness_complex_test_nearest_landmark_table Witness_complex_example_nearest_landmark_table)
+add_test(NAME Witness_complex_example_nearest_landmark_table
+ COMMAND $<TARGET_FILE:Witness_complex_example_nearest_landmark_table>)
# CGAL and Eigen3 are required for Euclidean version of Witness
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
@@ -28,17 +29,18 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
target_link_libraries(Witness_complex_example_strong_witness_persistence ${TBB_LIBRARIES})
endif()
- add_test(Witness_complex_off_test_torus
- ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_off
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 20 1.0 3)
- add_test(Witness_complex_strong_off_test_torus
- ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_strong_off
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 20 1.0 3)
- add_test(Witness_complex_test_sphere_10 Witness_complex_example_sphere 10)
- add_test(Witness_complex_test_torus_persistence
- ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_witness_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -l 20 -a 0.5)
- add_test(Witness_complex_strong_test_torus_persistence
- ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_example_strong_witness_persistence
- ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off -l 20 -a 0.5)
+ add_test(NAME Witness_complex_example_off_test_torus
+ COMMAND $<TARGET_FILE:Witness_complex_example_off>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3")
+ add_test(NAME Witness_complex_example_strong_off_test_torus
+ COMMAND $<TARGET_FILE:Witness_complex_example_strong_off>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "20" "1.0" "3")
+ add_test(NAME Witness_complex_example_test_sphere_10
+ COMMAND $<TARGET_FILE:Witness_complex_example_sphere> "10")
+ add_test(NAME Witness_complex_example_test_torus_persistence
+ COMMAND $<TARGET_FILE:Witness_complex_example_witness_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5")
+ add_test(NAME Witness_complex_example_strong_test_torus_persistence
+ COMMAND $<TARGET_FILE:Witness_complex_example_strong_witness_persistence>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "-l" "20" "-a" "0.5")
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
diff --git a/src/Witness_complex/test/CMakeLists.txt b/src/Witness_complex/test/CMakeLists.txt
index e73f9c3a..152e2f2c 100644
--- a/src/Witness_complex/test/CMakeLists.txt
+++ b/src/Witness_complex/test/CMakeLists.txt
@@ -1,14 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(Witness_complex_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
add_executable ( Witness_complex_test_simple_witness_complex test_simple_witness_complex.cpp )
target_link_libraries(Witness_complex_test_simple_witness_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
@@ -16,11 +9,7 @@ if (TBB_FOUND)
target_link_libraries(Witness_complex_test_simple_witness_complex ${TBB_LIBRARIES})
endif(TBB_FOUND)
-# Unitary tests definition and xml result file generation
-add_test(NAME simple_witness_complex
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_test_simple_witness_complex
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Witness_complex_test_simple_witness_complexUT.xml --log_level=test_suite --report_level=no)
+gudhi_add_coverage_test(Witness_complex_test_simple_witness_complex)
# CGAL and Eigen3 are required for Euclidean version of Witness
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
@@ -30,9 +19,5 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
target_link_libraries(Witness_complex_test_euclidean_simple_witness_complex ${TBB_LIBRARIES})
endif(TBB_FOUND)
- # Unitary tests definition and xml result file generation
- add_test(NAME euclidean_simple_witness_complex
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/Witness_complex_test_euclidean_simple_witness_complex
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/Witness_complex_test_euclidean_simple_witness_complexUT.xml --log_level=test_suite --report_level=no)
+ gudhi_add_coverage_test(Witness_complex_test_euclidean_simple_witness_complex)
endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0)
diff --git a/src/cmake/modules/GUDHI_doxygen_target.txt b/src/cmake/modules/GUDHI_doxygen_target.cmake
index d2cb952d..d2cb952d 100644
--- a/src/cmake/modules/GUDHI_doxygen_target.txt
+++ b/src/cmake/modules/GUDHI_doxygen_target.cmake
diff --git a/src/cmake/modules/GUDHI_test_coverage.cmake b/src/cmake/modules/GUDHI_test_coverage.cmake
new file mode 100644
index 00000000..ce171a0e
--- /dev/null
+++ b/src/cmake/modules/GUDHI_test_coverage.cmake
@@ -0,0 +1,14 @@
+
+if (GCOVR_PATH)
+ # for gcovr to make coverage reports - Corbera Jenkins plugin
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+endif()
+if (GPROF_PATH)
+ # for gprof to make coverage reports - Jenkins
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
+endif()
+
+function(gudhi_add_coverage_test unitary_test)
+ add_test(NAME ${unitary_test} COMMAND $<TARGET_FILE:${unitary_test}>
+ "--log_format=XML" "--log_sink=${CMAKE_BINARY_DIR}/${unitary_test}_UT.xml" "--log_level=test_suite" "--report_level=no")
+endfunction()
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.txt b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index 5f84c602..5f84c602 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.txt
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
index 61c94391..d5311b18 100644
--- a/src/common/example/CMakeLists.txt
+++ b/src/common/example/CMakeLists.txt
@@ -3,17 +3,20 @@ project(Common_examples)
add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp )
target_link_libraries(vector_double_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
-add_test(vector_double_off_reader ${CMAKE_CURRENT_BINARY_DIR}/vector_double_off_reader ${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off)
+add_test(NAME Common_example_vector_double_off_reader COMMAND $<TARGET_FILE:vector_double_off_reader>
+ "${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off")
if(CGAL_FOUND)
add_executable ( cgal_3D_off_reader example_CGAL_3D_points_off_reader.cpp )
target_link_libraries(cgal_3D_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
- add_test(cgal_3D_off_reader ${CMAKE_CURRENT_BINARY_DIR}/cgal_3D_off_reader ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off)
+ 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")
# need CGAL 4.7and Eigen3
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0)
add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
target_link_libraries(cgal_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY})
- add_test(cgal_off_reader ${CMAKE_CURRENT_BINARY_DIR}/cgal_off_reader ${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off)
+ 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.7.0)
endif()
diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt
index baa24539..c695fbf4 100644
--- a/src/common/test/CMakeLists.txt
+++ b/src/common/test/CMakeLists.txt
@@ -1,33 +1,18 @@
cmake_minimum_required(VERSION 2.6)
project(Common_tests)
-if (GCOVR_PATH)
- # for gcovr to make coverage reports - Corbera Jenkins plugin
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-endif()
-if (GPROF_PATH)
- # for gprof to make coverage reports - Jenkins
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
+include(GUDHI_test_coverage)
-add_executable ( poffreader_UT test_points_off_reader.cpp )
-target_link_libraries(poffreader_UT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Common_test_points_off_reader test_points_off_reader.cpp )
+target_link_libraries(Common_test_points_off_reader ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-add_executable ( distancematrixreader_UT test_distance_matrix_reader.cpp )
-target_link_libraries(distancematrixreader_UT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+add_executable ( Common_test_distance_matrix_reader test_distance_matrix_reader.cpp )
+target_link_libraries(Common_test_distance_matrix_reader ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
# Do not forget to copy test files in current binary dir
file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/lower_triangular_distance_matrix.csv" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-# Unitary tests
-add_test(poffreader_UT ${CMAKE_CURRENT_BINARY_DIR}/poffreader_UT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/poffreader_UT.xml --log_level=test_suite --report_level=no)
-
-add_test(distancematrixreader_UT ${CMAKE_CURRENT_BINARY_DIR}/distancematrixreader_UT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/distancematrixreader_UT.xml --log_level=test_suite --report_level=no)
-
-
+gudhi_add_coverage_test(Common_test_points_off_reader)
+gudhi_add_coverage_test(Common_test_distance_matrix_reader)