From 775e60bf8d22df68cfb04d71d9a633997e031564 Mon Sep 17 00:00:00 2001 From: Voldivh Date: Thu, 12 Oct 2023 12:06:59 -0500 Subject: [PATCH] Adds the gz_path env variable to UNIT_gz_TEST Signed-off-by: Voldivh --- src/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ad3eb9682..b1b17f6c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,6 +66,15 @@ if (BUILD_TESTING) target_link_libraries(UNIT_FrameSemantics_TEST TINYXML2::TINYXML2) endif() + if(TARGET UNIT_gz_TEST) + set(_env_vars) + list(APPEND _env_vars "GZ_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf") + list(APPEND _env_vars "GZ_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf/$") + + set_tests_properties(UNIT_gz_TEST PROPERTIES + ENVIRONMENT "${_env_vars}") + endif() + if (TARGET UNIT_ParamPassing_TEST) target_link_libraries(UNIT_ParamPassing_TEST TINYXML2::TINYXML2