diff --git a/cmake/podioTest.cmake b/cmake/podioTest.cmake index 804e0822b..95ee19ee4 100644 --- a/cmake/podioTest.cmake +++ b/cmake/podioTest.cmake @@ -3,8 +3,9 @@ function(PODIO_SET_TEST_ENV test) # We need to convert this into a list of arguments that can be used as environment variable list(JOIN PODIO_IO_HANDLERS " " IO_HANDLERS) - set(test_environment - LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/tests:${PROJECT_BINARY_DIR}/src:$:$<$:$>:$ENV{LD_LIBRARY_PATH} + set_property(TEST ${test} + PROPERTY ENVIRONMENT + LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/tests:${PROJECT_BINARY_DIR}/src:$:$<$:$>:$ENV{LD_LIBRARY_PATH} PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH} PODIO_SIOBLOCK_PATH=${PROJECT_BINARY_DIR}/tests ROOT_INCLUDE_PATH=${PROJECT_BINARY_DIR}/tests/datamodel:${PROJECT_SOURCE_DIR}/include @@ -15,9 +16,6 @@ function(PODIO_SET_TEST_ENV test) ENABLE_SIO=${ENABLE_SIO} PODIO_BUILD_BASE=${PROJECT_BINARY_DIR} ) - set_property(TEST ${test} - PROPERTY ENVIRONMENT "${test_environment}" - ) endfunction() #--- small utility helper function to allow for a more terse definition of tests below