Skip to content
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 order of cmake keywords in include_directories() for generated headers #161

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

meyerj
Copy link
Contributor

@meyerj meyerj commented Aug 20, 2020

Fixes a bug introduced in #140:

For cmake command include_directories() the order of keywords AFTER|BEFORE and SYSTEM matters and cannot be swapped:

Add include directories to the build.

include_directories([AFTER|BEFORE] [SYSTEM] dir1 [dir2 ...])

With

include_directories(SYSTEM BEFORE ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION})

the BEFORE keyword is considered as another include directory relative to the CMAKE_CURRENT_SOURCE_DIR. The generated compiler command line therefore contained flags like -isystem /path/to/my/package/BEFORE and also -isystem /path/to/devel/include as intended, just not in the expected order relative to other include directories.

Tested on Ubuntu Bionic with ROS melodic and CMake 3.10.2.

@meyerj
Copy link
Contributor Author

meyerj commented Aug 20, 2020

Just noticed that this is a duplicate of #151. I was still working on an older version of melodic-devel and built dynamic_reconfigure from source.

But apparently the patch has not been applied to branch noetic-devel yet. Shouldn't patches be applied to the newest development branch exclusively and then eventually backported to older versions?

@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/dynamic-reconfigure-maintenance/21950/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants