Skip to content

Commit 5e4e80f

Browse files
author
Lauris Kaplinski
committed
Use again absolute paths for tests
1 parent dd2cf68 commit 5e4e80f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ add_executable(unittests
33
../cdoc/CDocCipher.cpp
44
../cdoc/Crypto.cpp)
55

6+
target_compile_definitions(unittests PRIVATE
7+
DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
8+
)
9+
610
target_link_libraries(unittests
711
OpenSSL::SSL
812
cdoc
913
Boost::unit_test_framework)
1014

1115
add_test(NAME runtest
1216
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/unittests --build_info=YES --logger=HRF,all,stdout
13-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test
17+
WORKING_DIRECTORY $<TARGET_FILE_DIR:cdoc>
1418
)
1519

1620
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS unittests)

0 commit comments

Comments
 (0)