diff --git a/src/graph/Edge_TEST.cc b/src/graph/Edge_TEST.cc index 85486b431..cd28c1251 100644 --- a/src/graph/Edge_TEST.cc +++ b/src/graph/Edge_TEST.cc @@ -35,7 +35,7 @@ class EdgeTestFixture : public testing::Test // The list of edges we want to test. using EdgeTypes = ::testing::Types, UndirectedEdge>; -TYPED_TEST_CASE(EdgeTestFixture, EdgeTypes); +TYPED_TEST_SUITE(EdgeTestFixture, EdgeTypes, ); ///////////////////////////////////////////////// TYPED_TEST(EdgeTestFixture, Accessors) diff --git a/src/graph/GraphAlgorithms_TEST.cc b/src/graph/GraphAlgorithms_TEST.cc index 1130f7e94..dcd9bd476 100644 --- a/src/graph/GraphAlgorithms_TEST.cc +++ b/src/graph/GraphAlgorithms_TEST.cc @@ -34,7 +34,7 @@ class GraphTestFixture : public testing::Test // The list of graphs we want to test. using GraphTypes = ::testing::Types, UndirectedGraph>; -TYPED_TEST_CASE(GraphTestFixture, GraphTypes); +TYPED_TEST_SUITE(GraphTestFixture, GraphTypes, ); ///////////////////////////////////////////////// TYPED_TEST(GraphTestFixture, BreadthFirstSort) diff --git a/src/graph/Graph_TEST.cc b/src/graph/Graph_TEST.cc index 01fb7fbac..e68721e0b 100644 --- a/src/graph/Graph_TEST.cc +++ b/src/graph/Graph_TEST.cc @@ -55,7 +55,7 @@ class MockEdgesFullUndirectedGraph : public UndirectedGraph // The list of graphs we want to test. using GraphTypes = ::testing::Types, UndirectedGraph>; -TYPED_TEST_CASE(GraphTestFixture, GraphTypes); +TYPED_TEST_SUITE(GraphTestFixture, GraphTypes, ); ///////////////////////////////////////////////// TYPED_TEST(GraphTestFixture, UniformInitialization) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 035530294..ec5ae4b6c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,15 +1,17 @@ +configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h) include_directories ( - ${PROJECT_SOURCE_DIR}/test/gtest/include - ${PROJECT_SOURCE_DIR}/test/gtest - ${PROJECT_SOURCE_DIR}/test - ${CMAKE_BINARY_DIR}/include + ${PROJECT_BINARY_DIR}/include ) -configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h) - # Build gtest add_library(gtest STATIC gtest/src/gtest-all.cc) add_library(gtest_main STATIC gtest/src/gtest_main.cc) +target_include_directories(gtest + SYSTEM PUBLIC + ${PROJECT_SOURCE_DIR}/test/gtest/include + ${PROJECT_SOURCE_DIR}/test/gtest +) + target_link_libraries(gtest_main gtest) set_property(TARGET gtest_main PROPERTY CXX_STANDARD ${c++standard}) set_property(TARGET gtest PROPERTY CXX_STANDARD ${c++standard}) @@ -18,7 +20,6 @@ set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a") execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results) execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results) -include_directories(${GTEST_INCLUDE_DIRS}) #============================================================================ # Do a fake install of ign-math in order to test the examples.