From a4eb193ea2d05ad6af821013c9bea17068773542 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 24 Mar 2021 22:33:30 +0300 Subject: unit_tests: dynamic path to test_lib.pdb --- test/unit_tests/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/unit_tests/CMakeLists.txt') diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index 90f8bed..ae43fbb 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -9,4 +9,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") install(FILES "$" DESTINATION bin/test OPTIONAL) endif() -add_test(NAME unit_tests COMMAND unit_tests --log_level=all --no_color_output) +if(MSVC) + # Set the working directory so that the unit_tests binary can find the + # test_lib shared library binary. + add_test(NAME unit_tests + COMMAND unit_tests --log_level=all --no_color_output -- --test_lib_pdb "$" + WORKING_DIRECTORY "$") +endif() -- cgit v1.2.3