From e79798ac978d21ad8ad4a0792147c54ba66d5d3f Mon Sep 17 00:00:00 2001 From: Pierre Gradot Date: Wed, 12 Jun 2024 11:25:59 +0200 Subject: [PATCH] Fix WORKING_DIRECTORY for unit tests When jsoncons was fetched from another project, ctest failed because the path wasn't found --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ce0d9d74c..7c49dd587 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -215,7 +215,7 @@ target_compile_options(unit_tests PRIVATE ) endif() -add_test(NAME unit_tests COMMAND unit_tests WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) +add_test(NAME unit_tests COMMAND unit_tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories (unit_tests PUBLIC ${JSONCONS_INCLUDE_DIR}