From 73e9d0dfa7804c07b20a2595fde8a9e9fed5f260 Mon Sep 17 00:00:00 2001 From: Martin Killenberg <martin.killenberg@desy.de> Date: Fri, 1 Sep 2017 17:01:01 +0200 Subject: [PATCH] adding the current path to the linker flags before the other link pathes so an installed library is not taken, but the one supposed to be tested --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02716a2..de9aa76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,8 +60,8 @@ if(TESTING_IS_ENABLED) get_filename_component(excutableName ${testExecutableSrcFile} NAME_WE) # each test includes a DOOCS server add_executable(${excutableName} ${testExecutableSrcFile}) - set_target_properties(${excutableName} PROPERTIES COMPILE_FLAGS "${ChimeraTK-ControlSystemAdapter_CXX_FLAGS} ${DOOCS_CXX_FLAGS}") - set_target_properties(${excutableName} PROPERTIES LINK_FLAGS "${ChimeraTK-ControlSystemAdapter_LINKER_FLAGS} ${DOOCS_LINKER_FLAGS}") + set_target_properties(${excutableName} PROPERTIES COMPILE_FLAGS "${ChimeraTK-ControlSystemAdapter_CXX_FLAGS} ${DOOCS_CXX_FLAGS} ${doocs-server-test-helper_CXX_FLAGS}") + set_target_properties(${excutableName} PROPERTIES LINK_FLAGS "-Wl,-rpath=${CMAKE_BINARY_DIR},--enable-new-dtags ${ChimeraTK-ControlSystemAdapter_LINKER_FLAGS} ${DOOCS_LINKER_FLAGS} ${doocs-server-test-helper_LINKER_FLAGS}") target_link_libraries(${excutableName} ${PROJECT_NAME} ${doocs-server-test-helper_LIBRARIES}) add_test(${excutableName} ${excutableName}) endforeach( testExecutableSrcFile ) -- GitLab