This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
2016-05-20 18:46:37 +02:00
|
|
|
set(target tests)
|
|
|
|
|
|
|
|
file(GLOB core_sources "*.cpp")
|
|
|
|
|
2016-05-20 21:37:30 +02:00
|
|
|
find_package(GTest REQUIRED)
|
2016-05-20 18:46:37 +02:00
|
|
|
|
2016-05-20 19:50:11 +02:00
|
|
|
include_directories(
|
2016-05-20 18:46:37 +02:00
|
|
|
${GTEST_INCLUDE_DIRS}
|
|
|
|
${Boost_INCLUDE_DIRS}
|
|
|
|
${PROJECT_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
set(libraries
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${GTEST_BOTH_LIBRARIES}
|
|
|
|
plasp
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY data DESTINATION ${CMAKE_BINARY_DIR})
|
|
|
|
|
|
|
|
add_executable(${target} ${core_sources})
|
|
|
|
target_link_libraries(${target} ${libraries})
|
|
|
|
GTEST_ADD_TESTS(tests "" ${core_sources})
|
2016-05-20 20:00:03 +02:00
|
|
|
|
|
|
|
add_custom_target(run-tests
|
|
|
|
COMMAND ${CMAKE_BINARY_DIR}/bin/tests
|
|
|
|
DEPENDS ${target}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|