Home | Tutorials | Wiki | Issues
Ask Your Question

How to use >C++11 with a ignition or gazebo project

asked 2017-10-07 12:46:05 -0500

If I am compiling against ign-*, or gazebo, I get -std=c++11 added to my CMAKE_CXX_FLAGS. Now, I understand that ign-* and gazebo require C++11, but I want to use C++14 or C++17.

For example, target_link_library(target ${IGNITION-TRANSPORT-LIBRARIES) will add -std=c++11 to the very end of my compile flags rendering any attempts like set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z useless.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-10-09 11:49:12 -0500

Carlos Agüero gravatar image

What about if you use set(CMAKE_CXX_STANDARD 14) at the top of your CMakeLists,txt?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-10-07 12:46:05 -0500

Seen: 63 times

Last updated: Oct 09