From 6def9fcf1cdec117866877aa5e7241e23bdc8c23 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 26 Apr 2021 18:56:41 +0200 Subject: tests: pass ucode library path through environment This is required for out-of-tree builds where the *.so file location cannot be derived from the path of the ucode executable. Signed-off-by: Jo-Philipp Wich --- tests/custom/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/custom/CMakeLists.txt') diff --git a/tests/custom/CMakeLists.txt b/tests/custom/CMakeLists.txt index d56cb99..c8007a0 100644 --- a/tests/custom/CMakeLists.txt +++ b/tests/custom/CMakeLists.txt @@ -3,7 +3,10 @@ ADD_TEST( COMMAND run_tests.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -SET_PROPERTY(TEST custom APPEND PROPERTY ENVIRONMENT "UCODE_BIN=valgrind --quiet --leak-check=full $") +SET_PROPERTY(TEST custom APPEND PROPERTY ENVIRONMENT + "UCODE_BIN=valgrind --quiet --leak-check=full $" + "UCODE_LIB=${CMAKE_BINARY_DIR}" +) IF(CMAKE_C_COMPILER_ID STREQUAL "Clang") ADD_TEST( @@ -12,5 +15,8 @@ IF(CMAKE_C_COMPILER_ID STREQUAL "Clang") WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - SET_PROPERTY(TEST custom-san APPEND PROPERTY ENVIRONMENT "UCODE_BIN=$") + SET_PROPERTY(TEST custom-san APPEND PROPERTY ENVIRONMENT + "UCODE_BIN=$" + "UCODE_LIB=${CMAKE_BINARY_DIR}" + ) ENDIF() -- cgit v1.2.3