Added Google Test as a submodule to avoid potential linking issues.

This commit is contained in:
Patrick Lühne 2016-05-20 21:59:44 +02:00
parent 38c8a96d99
commit e0c510a95f
3 changed files with 10 additions and 4 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "tests/googletest"]
path = tests/googletest
url = git@github.com:google/googletest.git

View File

@ -2,17 +2,19 @@ set(target tests)
file(GLOB core_sources "*.cpp")
find_package(GTest REQUIRED)
add_subdirectory(googletest)
include_directories(
${GTEST_INCLUDE_DIRS}
${gtest_SOURCE_DIR}/include
${gtest_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include
)
set(libraries
gtest_main
gtest
${Boost_LIBRARIES}
${GTEST_BOTH_LIBRARIES}
plasp
)
@ -20,7 +22,7 @@ file(COPY data DESTINATION ${CMAKE_BINARY_DIR})
add_executable(${target} ${core_sources})
target_link_libraries(${target} ${libraries})
GTEST_ADD_TESTS(tests "" ${core_sources})
add_test(tests ${core_sources})
add_custom_target(run-tests
COMMAND ${CMAKE_BINARY_DIR}/bin/tests

1
tests/googletest Submodule

@ -0,0 +1 @@
Subproject commit 0a439623f75c029912728d80cb7f1b8b48739ca4