Skip to content

Commit 269e0d4

Browse files
committed
fix(tests): Fix linking base tests agains installed libs
Disabling new dtags forces linker to use RPATH which ignores LD_LIBRARY_PATH over RUNPATH which is overwritten by LD_LIBRARY_PATH. Tests should always use locally build libs.
1 parent e22c961 commit 269e0d4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmake/private/FairRootTargets.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function(fairroot_add_catch2_test_suite suite)
102102
set(exe "test_${suite}")
103103
add_executable(${exe})
104104
target_sources(${exe} PRIVATE ${ARGS_SOURCES})
105+
target_link_options(${exe} PRIVATE -Wl,--disable-new-dtags)
105106
target_link_libraries(${exe} PRIVATE Catch2::Catch2WithMain)
106107
if(ARGS_DEPENDENCIES)
107108
target_link_libraries(${exe} PRIVATE ${ARGS_DEPENDENCIES})

0 commit comments

Comments
 (0)