From 4d72c71a2b42e789370280f33958bb9ae9e0baaa Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sun, 28 Jun 2020 00:48:11 +0200 Subject: [PATCH] set append_library_dir inside the macro to avoid accumulating values over macro calls Signed-off-by: Mikael Arguedas --- test_security/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_security/CMakeLists.txt b/test_security/CMakeLists.txt index da614b67..8a552781 100644 --- a/test_security/CMakeLists.txt +++ b/test_security/CMakeLists.txt @@ -256,6 +256,11 @@ if(BUILD_TESTING) set(ENV_PATH "$ENV{PATH}") file(TO_CMAKE_PATH "${ENV_PATH}" ENV_PATH) set(TEST_PATH "${ENV_PATH}") + set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}") + if(WIN32) + set(append_library_dirs "${append_library_dirs}/$") + endif() + if(rmw_implementation STREQUAL "rmw_connext_cpp") # Connext 5.3.1 needs RTI's OpenSSL binaries (based on EOL 1.0.2) to be # on the PATH at runtime as the system version of OpenSSL is not supported @@ -316,11 +321,6 @@ if(BUILD_TESTING) custom_executable(test_secure_subscriber_cpp "test/test_secure_subscriber.cpp") - set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}") - if(WIN32) - set(append_library_dirs "${append_library_dirs}/$") - endif() - # finding gtest once in the highest scope # prevents finding it repeatedly in each local scope ament_find_gtest()