summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Persistent_cohomology/test/CMakeLists.txt')
-rw-r--r--src/Persistent_cohomology/test/CMakeLists.txt26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/Persistent_cohomology/test/CMakeLists.txt b/src/Persistent_cohomology/test/CMakeLists.txt
index ed63a6ac..a21f39c4 100644
--- a/src/Persistent_cohomology/test/CMakeLists.txt
+++ b/src/Persistent_cohomology/test/CMakeLists.txt
@@ -1,21 +1,23 @@
cmake_minimum_required(VERSION 2.6)
-project(GUDHIPersistentCohomologyUT)
+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")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
-endif()
+endif(GCOVR_PATH)
if (GPROF_PATH)
# for gprof to make coverage reports - Jenkins
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pg")
-endif()
+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})
+if (TBB_FOUND)
+ target_link_libraries(PersistentCohomologyUT ${TBB_LIBRARIES})
+ target_link_libraries(BettiNumbersUT ${TBB_LIBRARIES})
+endif(TBB_FOUND)
# Unitary tests
add_test(NAME PersistentCohomologyUT
@@ -24,9 +26,17 @@ add_test(NAME PersistentCohomologyUT
# XML format for Jenkins xUnit plugin
--log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/PersistentCohomologyUT.xml --log_level=test_suite --report_level=no)
+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)
+
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})
+ if (TBB_FOUND)
+ target_link_libraries(PersistentCohomologyMultiFieldUT ${TBB_LIBRARIES})
+ endif(TBB_FOUND)
# Unitary tests
add_test(NAME PersistentCohomologyMultiFieldUT
@@ -35,5 +45,5 @@ if(GMPXX_FOUND AND GMP_FOUND)
# XML format for Jenkins xUnit plugin
--log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/PersistentCohomologyMultiFieldUT.xml --log_level=test_suite --report_level=no)
-endif()
+endif(GMPXX_FOUND AND GMP_FOUND)