horcrux/test/CMakeLists.txt

19 lines
466 B
CMake
Raw Normal View History

2020-12-11 11:38:02 +00:00
set(BINARY ${CMAKE_PROJECT_NAME}_test)
2020-12-12 14:36:38 +00:00
add_executable(${BINARY}
2020-12-12 23:56:18 +00:00
main.cpp
crypto-test.cpp
io-test.cpp
utils-test.cpp
integration-test.cpp
2020-12-12 14:36:38 +00:00
)
2020-12-11 11:38:02 +00:00
add_test(NAME test COMMAND ${BINARY})
target_link_libraries(${BINARY} PUBLIC ${CMAKE_PROJECT_NAME}_lib gtest)
2020-12-12 00:44:49 +00:00
2020-12-12 22:29:29 +00:00
#Copy files needed for unit tests
2020-12-12 00:44:49 +00:00
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_work_dir
2020-12-12 23:56:18 +00:00
DESTINATION ${CMAKE_BINARY_DIR})
2020-12-12 00:44:49 +00:00
add_definitions(-DTEST_WORK_DIR="${CMAKE_BINARY_DIR}/test_work_dir")