Skip to content

Commit

Permalink
Update ODAS to fix the cmake version warning, and hide ODAS code warn…
Browse files Browse the repository at this point in the history
…ings using an object library as an intermediary (#39)
  • Loading branch information
philippewarren authored Dec 5, 2024
1 parent 012b765 commit 0d26e65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion odas_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ set(odas_shared_srcs
src/odas/demo/odaslive/threads.c
)

# But through an object library to hide warnings from the ODAS code
add_library(odas_shared_srcs_objlib OBJECT ${odas_shared_srcs})
target_compile_options(odas_shared_srcs_objlib PRIVATE -w)
target_include_directories(odas_shared_srcs_objlib PRIVATE
src/odas/include
src/odas/include/odas
src/odas/demo/odaslive
)

# C++ Nodes
add_executable(odas_core_node src/odas_core_node.cpp ${odas_shared_srcs})
add_executable(odas_core_node src/odas_core_node.cpp $<TARGET_OBJECTS:odas_shared_srcs_objlib>)
ament_target_dependencies(odas_core_node rclcpp)
target_link_libraries(odas_core_node odas)
install(TARGETS odas_core_node DESTINATION lib/${PROJECT_NAME})
Expand Down
2 changes: 1 addition & 1 deletion odas_ros/src/odas
Submodule odas updated 1 files
+1 −1 CMakeLists.txt

0 comments on commit 0d26e65

Please sign in to comment.