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

Rebased 190: export compiler flags #262

Conversation

gavanderhoorn
Copy link
Member

This is a rebase of #190 (which addresses #188), combined with a migration to a more scalable solution (which itself is a compromise between how we'd like to do it (with modern CMake) and what Catkin supports in ROS 1).

I opted to include additional commits in this rebased PR as the basic principle (use a CFG_EXTRAS file to export -D flags to dependents) is still used. The file just doesn't set those flags directly, that's left up to the dependent.

I've also opted to remove the old defines (ie: ROS, MOTOPLUS and LINUXSOCKETS) instead of keeping them around.

They were really only used with early versions of MotoROS and we don't want to have them lingering around.

tcd == target compile definition.

Instead of automatically (and unconditionally) adding these to the include(..)-ing context, define a variable which can be used with target_compile_definitions(..)  by dependents.
Compile IRC libs with the same flags.
All dependents must also use these if they include any simple_message and/or IRC public headers.
@gavanderhoorn
Copy link
Member Author

gavanderhoorn commented Jun 22, 2021

Note: this does require dependents to actively use the exported simple_message_DEFINITIONS and industrial_robot_client_DEFINITIONS variables. But that seems like an OK compromise considering the alternative would be to unconditionally add the flags to the dependent's compilation flags.

I'll prepare a PR against fanuc_driver and abb_driver to update their build scripts.

@gavanderhoorn
Copy link
Member Author

@JeremyZoss @Levi-Armstrong: if either of you could review?

As this is now a PR I opened I cannot review it myself.

@gavanderhoorn gavanderhoorn merged commit 3fe10f1 into ros-industrial:melodic-devel Jun 22, 2021
@gavanderhoorn gavanderhoorn deleted the rebased_export_compiler_flags branch June 22, 2021 15:59
@gavanderhoorn
Copy link
Member Author

Thanks @Levi-Armstrong 👍

gavanderhoorn added a commit to gavanderhoorn/industrial_core that referenced this pull request Jul 15, 2021
This adds some bw-compatibility to the changes merged in ros-industrial#262.

Remove these in noetic-devel.
gavanderhoorn added a commit that referenced this pull request Jul 15, 2021
This adds some bw-compatibility to the changes merged in #262.

Remove these in noetic-devel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants