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.
plasp/tests/CMakeLists.txt

31 lines
569 B
CMake
Raw Normal View History

2016-05-20 18:46:37 +02:00
set(target tests)
file(GLOB core_sources "*.cpp")
add_subdirectory(googletest)
2016-05-20 18:46:37 +02:00
2016-05-20 19:50:11 +02:00
include_directories(
${gtest_SOURCE_DIR}/include
${gtest_SOURCE_DIR}
2016-05-20 18:46:37 +02:00
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include
)
set(libraries
gtest_main
gtest
2016-05-20 18:46:37 +02:00
${Boost_LIBRARIES}
plasp
)
file(COPY data DESTINATION ${CMAKE_BINARY_DIR})
add_executable(${target} ${core_sources})
target_link_libraries(${target} ${libraries})
add_test(tests ${core_sources})
add_custom_target(run-tests
COMMAND ${CMAKE_BINARY_DIR}/bin/tests
DEPENDS ${target}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})