diff --git a/test/k4FWCoreTest/CMakeLists.txt b/test/k4FWCoreTest/CMakeLists.txt index ab7304e5..6033bcdf 100644 --- a/test/k4FWCoreTest/CMakeLists.txt +++ b/test/k4FWCoreTest/CMakeLists.txt @@ -42,15 +42,6 @@ include(CTest) set(K4RUN ${PROJECT_SOURCE_DIR}/k4FWCore/scripts/k4run) -get_target_property(edm4hep_lib EDM4HEP::edm4hepDict LOCATION) -get_filename_component(edm4hep_loc ${edm4hep_lib} DIRECTORY) - -get_target_property(root_lib ROOT::Core LOCATION) -get_filename_component(root_loc ${root_lib} DIRECTORY) - -get_target_property(podio_lib podio::podio LOCATION) -get_filename_component(podio_loc ${podio_lib} DIRECTORY) - #--- The genConf directory has been renamed to genConfDir in Gaudi 35r1 #--- See https://gitlab.cern.ch/gaudi/Gaudi/-/merge_requests/1158 set(GAUDI_GENCONF_DIR "genConfDir") @@ -60,8 +51,8 @@ endif() function(set_test_env _testname) - set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT "ROOT_INCLUDE_PATH=${podio_loc}/../include/podio:${edm4hep_loc}/../include:$ENV{ROOT_INCLUDE_PATH}") - set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}:${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}:${PROJECT_BINARY_DIR}/test/k4FWCoreTest:${root_loc}:${edm4hep_loc}:${podio_loc}:$ENV{LD_LIBRARY_PATH}") + set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT "ROOT_INCLUDE_PATH=$<$:$/../include>:$<$:$/../include>:$ENV{ROOT_INCLUDE_PATH}") + set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}:${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}:${PROJECT_BINARY_DIR}/test/k4FWCoreTest:$<$:$>:$<$:$>:$<$:$>:$ENV{LD_LIBRARY_PATH}") set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/${GAUDI_GENCONF_DIR}:${PROJECT_BINARY_DIR}/test/k4FWCoreTest/${GAUDI_GENCONF_DIR}:$ENV{PYTHONPATH}") endfunction()