Skip to content

Commit f21f681

Browse files
set append_library_dir inside the macro to avoid accumulating values over macro calls
Signed-off-by: Mikael Arguedas <[email protected]>
1 parent f7347b1 commit f21f681

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: test_security/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ if(BUILD_TESTING)
256256
set(ENV_PATH "$ENV{PATH}")
257257
file(TO_CMAKE_PATH "${ENV_PATH}" ENV_PATH)
258258
set(TEST_PATH "${ENV_PATH}")
259+
set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}")
260+
if(WIN32)
261+
set(append_library_dirs "${append_library_dirs}/$<CONFIG>")
262+
endif()
263+
259264
if(rmw_implementation STREQUAL "rmw_connext_cpp")
260265
# Connext 5.3.1 needs RTI's OpenSSL binaries (based on EOL 1.0.2) to be
261266
# on the PATH at runtime as the system version of OpenSSL is not supported
@@ -315,11 +320,6 @@ if(BUILD_TESTING)
315320
custom_executable(test_secure_subscriber_cpp
316321
"test/test_secure_subscriber.cpp")
317322

318-
set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}")
319-
if(WIN32)
320-
set(append_library_dirs "${append_library_dirs}/$<CONFIG>")
321-
endif()
322-
323323
# finding gtest once in the highest scope
324324
# prevents finding it repeatedly in each local scope
325325
ament_find_gtest()

0 commit comments

Comments
 (0)