-
Notifications
You must be signed in to change notification settings - Fork 814
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
Fix Eigen Plugins compilation when linking to grid_map_core #475
Draft
Ryanf55
wants to merge
3
commits into
ANYbotics:rolling
Choose a base branch
from
Ryanf55:382-bug
base: rolling
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ 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) | ||
|
@@ -35,6 +34,9 @@ add_library(${PROJECT_NAME} | |
src/iterators/SlidingWindowIterator.cpp | ||
) | ||
|
||
## Define Eigen addons. | ||
include(cmake/${PROJECT_NAME}-extras.cmake) | ||
|
||
## Specify additional locations of header files | ||
target_include_directories(${PROJECT_NAME} | ||
PUBLIC | ||
|
@@ -127,6 +129,7 @@ endif() | |
|
||
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET) | ||
ament_export_dependencies(Eigen3) | ||
ament_package(CONFIG_EXTRAS | ||
cmake/${PROJECT_NAME}-extras.cmake | ||
) | ||
ament_package() | ||
#ament_package(CONFIG_EXTRAS | ||
# cmake/${PROJECT_NAME}-extras.cmake | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks if we leave it in - any tips on how to test the plugins are working in another package? |
||
#) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(issue382) | ||
|
||
find_package(grid_map_core CONFIG REQUIRED) | ||
find_package(Eigen3 CONFIG REQUIRED) | ||
|
||
|
||
add_executable(main1 main1.cpp) | ||
target_link_libraries(main1 PRIVATE grid_map_core::grid_map_core) | ||
|
||
|
||
add_executable(main2 main2.cpp) | ||
target_link_libraries(main2 PRIVATE Eigen3::Eigen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <Eigen/Core> | ||
|
||
int main() { | ||
|
||
Eigen::VectorXd v(10); | ||
v[0] = 0.1; | ||
v[1] = 0.2; | ||
v(0) = 0.3; | ||
v(1) = 0.4; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <Eigen/Core> | ||
|
||
|
||
int main() { | ||
|
||
Eigen::VectorXd v(10); | ||
v[0] = 0.1; | ||
v[1] = 0.2; | ||
v(0) = 0.3; | ||
v(1) = 0.4; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>issue382</name> | ||
<version>2.0.0</version> | ||
<description>foo.</description> | ||
<maintainer email="[email protected]">ryan f</maintainer> | ||
<maintainer email="[email protected]">Yoshua Nava</maintainer> | ||
<maintainer email="[email protected]">Ryan Friedman</maintainer> | ||
<license>BSD</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>grid_map_core</depend> | ||
<depend>eigen</depend> | ||
|
||
<test_depend>ament_cmake_gtest</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
<test_depend>ament_lint_auto</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be moved down till after the library is created. You can't call
target_compile_definitions
on a target until the target exists.