diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2014-12-08 15:03:32 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2014-12-08 15:03:32 +0000 |
commit | e8cca67a337b9d4bdbd1a8558ad99862862145f3 (patch) | |
tree | fc1fa507ef18629698f7e7e87f5bb1adaae04719 /src/Simplex_tree/test/CMakeLists.txt | |
parent | 807527bc3b79a30c0c86ffc27143ee1d45a84a77 (diff) |
cpplint fixes, lcov+cpplint auto unit test
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cpplint_test@345 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Diffstat (limited to 'src/Simplex_tree/test/CMakeLists.txt')
-rw-r--r-- | src/Simplex_tree/test/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Simplex_tree/test/CMakeLists.txt b/src/Simplex_tree/test/CMakeLists.txt index a15ac04e..eeb066d4 100644 --- a/src/Simplex_tree/test/CMakeLists.txt +++ b/src/Simplex_tree/test/CMakeLists.txt @@ -5,7 +5,29 @@ project(GUDHITestSimplexTree) 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 ( TestSimplexTree UnitTestSimplexTree.cpp ) target_link_libraries(TestSimplexTree ${Boost_LIBRARIES}) +# Unitary tests +add_test(TestSimplexTree ${CMAKE_CURRENT_BINARY_DIR}/TestSimplexTree) + +if (LCOV_PATH) + # Lcov code coverage of unitary test + add_test(TestSimplexTreeCov ${CMAKE_SOURCE_DIR}/scripts/check_code_coverage.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree) +endif() + +if (PYTHON_PATH) + # Cpplint tests on coding style + add_test(CpplintSimplexTree ${CMAKE_SOURCE_DIR}/scripts/check_google_style.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree/include/gudhi/Simplex_tree.h) + add_test(CpplintSimplexTreeIndexingTag ${CMAKE_SOURCE_DIR}/scripts/check_google_style.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree/include/gudhi/Simplex_tree/indexing_tag.h) + add_test(CpplintSimplexTreeIterator ${CMAKE_SOURCE_DIR}/scripts/check_google_style.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h) + add_test(CpplintSimplexTreeNode ${CMAKE_SOURCE_DIR}/scripts/check_google_style.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h) + add_test(CpplintSimplexTreeSiblings ${CMAKE_SOURCE_DIR}/scripts/check_google_style.sh ${CMAKE_SOURCE_DIR}/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h) +endif()
\ No newline at end of file |