Added Google Test as a submodule to avoid potential linking issues.
This commit is contained in:
parent
38c8a96d99
commit
e0c510a95f
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "tests/googletest"]
|
||||
path = tests/googletest
|
||||
url = git@github.com:google/googletest.git
|
@ -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
1
tests/googletest
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0a439623f75c029912728d80cb7f1b8b48739ca4
|
Reference in New Issue
Block a user