-
Notifications
You must be signed in to change notification settings - Fork 125
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
ament_cmake function to consolidate compile options #160
Comments
To clarify which compile options you are referring to (which affect ABI) can you please explicitly enumerate them. I see a few problems with the described approach:
CMake toolchain files would be one proper way of ensuring the same compiler options are being used across multiple packages. Others would be passing
The CMake function |
I like the idea of a toolchain file. I'll look into that and report back. As for |
@dirk-thomas I've looked into using a toolchain file, and I see two main drawbacks:
I was thinking, I could just add the I also realized I haven't answered the question about which flags affect the ABI. This article gives a good overview of compiler flags and their potential consequences |
That is why a toolchain file is the preferred approach.
While that is certainly not convenient there is no reason this can't be improved. That would probably fall into the same category as colcon/colcon-core#168.
The downside of using
That doesn't really answer the question which of the flags you want to use. |
@dirk-thomas At a basic level, we would like to use
|
@dirk-thomas Would it be viable to extend |
Of course 👍 |
Closing due to no activity. It also sounds like the direction is to address this on the build tool level instead. |
Motivation
ament_cmake
function, let's call itament_target_compile_options(target_name)
, which can be called after everyadd_library
oradd_executable
call to set the compile option for each targetGoals
Steps
ament_target_compile_options
ament_add_library/executable
(optional - see 3)ament_add_library/executable
or addament_target_compile_options
after everyadd_library/executable
callOpen question
add_test
?Future work
The text was updated successfully, but these errors were encountered: