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

Avoid to append GAZEBO_CXX_FLAGS to CMAKE_CXX_FLAGS #500

Merged
merged 1 commit into from
Jul 17, 2020
Merged

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jul 16, 2020

GAZEBO_CXX_FLAGS was added to CMAKE_CXX_FLAGS in #190 to support compilation against Gazebo 6 that required C++11, and unfortunately since then Gazebo did not switch to a modern way of specifying C++ standard requirement in consuming libraries. Now that YARP requires C++14, passing GAZEBO_CXX_FLAGS (that contains -std=c++11) basically bypass the CMake logic to compute the correct C++ standard with which to compile the plugins, and forces to compile them with C++11.

As the only reason for which GAZEBO_CXX_FLAGS was added to CMAKE_CXX_FLAGS was to enable C++11 support, and as that is already passed as a requirement by YARP targets, I think we can just remove it.

Related SDFormat PR: gazebosim/sdformat#251 .
Fix robotology/robotology-superbuild#426 .

GAZEBO_CXX_FLAGS was added to CMAKE_CXX_FLAGS in #190
to support compilation against Gazebo 6 that required C++11, and unfortunately since then Gazebo did not switch to a modern
way of specifying C++ standard requirement in consuming libraries. Now that YARP requires C++14, passing GAZEBO_CXX_FLAGS 
(that contains -std=c++11) basically bypass the CMake logic to compute the correct C++ standard with which to compile the plugins,
and forces to compile them with C++11. 

As the only reason for which GAZEBO_CXX_FLAGS was added to CMAKE_CXX_FLAGS was to enable C++11 support, and as that is already 
passed as a requirement by YARP, I think we can just remove it.

Related SDFormat PR: gazebosim/sdformat#251 .
Copy link
Member

@Nicogene Nicogene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traversaro traversaro merged commit 62edebc into master Jul 17, 2020
@traversaro traversaro deleted the fix-rs-426 branch July 17, 2020 09:33
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.

devel branches are not compiling correctly on Ubuntu 18.04/20.04
2 participants