Skip to content

[ROS2] Restrict Eigen plugin definitions to only targets linking against grid_map_core #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ project(grid_map_core)
find_package(ament_cmake REQUIRED)
find_package(grid_map_cmake_helpers REQUIRED)

## Define Eigen addons.
include(cmake/${PROJECT_NAME}-extras.cmake)

## System dependencies are found with CMake's conventions
find_package(Eigen3 REQUIRED)

Expand Down Expand Up @@ -44,6 +41,12 @@ target_include_directories(${PROJECT_NAME}

target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen)

target_compile_definitions(${PROJECT_NAME}
PUBLIC
EIGEN_DENSEBASE_PLUGIN="grid_map_core/eigen_plugins/DenseBasePlugin.hpp"
EIGEN_FUNCTORS_PLUGIN="grid_map_core/eigen_plugins/FunctorsPlugin.hpp"
)

#############
## Install ##
#############
Expand Down Expand Up @@ -127,6 +130,4 @@ endif()

ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(Eigen3)
ament_package(CONFIG_EXTRAS
cmake/${PROJECT_NAME}-extras.cmake
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cmake extras should not be needed, since the public target_compile_definitions will be propagated to all dependencies.

)
ament_package()
17 changes: 0 additions & 17 deletions grid_map_core/cmake/grid_map_core-extras.cmake

This file was deleted.

Loading