-
Notifications
You must be signed in to change notification settings - Fork 129
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
Guard against DELETE being predefined on Windows #401
Conversation
Motivated by build errors encountered building visualization_msgs/msg/Marker.msg. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
CI before and after: ros2/common_interfaces#70 (comment) |
Rather than undefining unconditionally at the top of the file, only undefine if a constant by one of the common names is defined. Also, redefine the macro after the constant has been declared using the pragma push_macro and pop_macro. Suppress a potential warning for popping a macro that was not previously pushed. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
I've updated the PR so that we only undefine if a constant is using the same name. Ultimately, name mangling as described in ros2/design#172 is probably the way to go, but in order to unblock ros2/common_interfaces#70 we have this solution for now. Windows CI:
|
Is it still possible for code to use the constants? Is the current Jenkins build only testing if the generated code compiles or also if these constants can be used from other packages? |
Good question. Though I built and tested ros-visualization/interactive_markers#44 as part of the job, it doesn't actually use the constant. I'll try triggering another job that includes code that actually uses one of the constants that are affected by this change. |
@dirk-thomas Looks like we can use the constants still. This build exercises |
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Motivated by build errors encountered building visualization_msgs/msg/Marker.msg.