Skip to content

Commit

Permalink
Avoid to append GAZEBO_CXX_FLAGS to CMAKE_CXX_FLAGS
Browse files Browse the repository at this point in the history
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 .
  • Loading branch information
traversaro authored Jul 16, 2020
1 parent 927874b commit 95663bc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ if(MSVC)
add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE=1)
endif()


# Add Gazebo CXX flags, to support Gazebo 6 reckless dependency on C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}")

# On Windows, export all symbols by default as *nix
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

Expand Down

0 comments on commit 95663bc

Please sign in to comment.