Skip to content

Commit e47819f

Browse files
authored
Fix thread issues added upstream (backport #56) (#57)
Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
1 parent da5bd39 commit e47819f

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ endif()
4545
set(rcutils_sources
4646
src/allocator.c
4747
src/array_list.c
48-
src/base64.c
48+
$<$<NOT:$<BOOL:${RCUTILS_MICROROS}>>:src/base64.c>
4949
src/char_array.c
5050
src/cmdline_parser.c
5151
src/env.c
@@ -100,11 +100,10 @@ configure_file(
100100
)
101101

102102
target_link_libraries(${PROJECT_NAME}
103-
${CMAKE_DL_LIBS}
104103
ament_cmake_ros_core::ament_ros_defaults
105104
)
106105
if(NOT RCUTILS_NO_FILESYSTEM)
107-
target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS})
106+
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
108107
endif()
109108

110109
check_library_exists(atomic __atomic_load_8 "" HAVE_LIBATOMICS)
@@ -694,11 +693,13 @@ if(BUILD_TESTING)
694693
target_link_libraries(benchmark_err_handle ${PROJECT_NAME} ament_cmake_ros_core::ament_ros_defaults)
695694
endif()
696695

697-
ament_add_gtest(test_base64
698-
test/test_base64.cpp
699-
)
700-
if(TARGET test_base64)
701-
target_link_libraries(test_base64 ${PROJECT_NAME} ament_cmake_ros_core::ament_ros_defaults)
696+
if(NOT RCUTILS_MICROROS)
697+
ament_add_gtest(test_base64
698+
test/test_base64.cpp
699+
)
700+
if(TARGET test_base64)
701+
target_link_libraries(test_base64 ${PROJECT_NAME} ament_cmake_ros_core::ament_ros_defaults)
702+
endif()
702703
endif()
703704
endif()
704705

0 commit comments

Comments
 (0)