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

Turn C++11 on by default #29

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/Rock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ macro (rock_init PROJECT_NAME PROJECT_VERSION)
rock_use_full_rpath("${CMAKE_INSTALL_PREFIX}/lib")
include(CheckCXXCompilerFlag)
include(FindPkgConfig)

OPTION(ROCK_USE_CXX11 "Compile package using the C++11 standard" ON)
Copy link
Member

Choose a reason for hiding this comment

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

👎 Let's keep it OFF by default and turn it on on systems that support it. I really don't see the downside to that.

Copy link
Member

Choose a reason for hiding this comment

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

There are external packages that in current versions rely on cpp11, like the widely used control/urdfdom version 1.0 from ROS.
Rather than having a long list in the overrides to enable it fo all packages using it, i'd rather have it enabled globally.

Btw.: Which are the supported OSes for rock that do not have c++11 features?

Copy link
Member

Choose a reason for hiding this comment

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

like the widely used control/urdfdom version 1.0 from ROS.

It (and its dependencies) compile just fine on a Rock install that does not have C++11 enabled.

But anyways, this is not the point.

I am all for controlling that feature on the autoproj level, and turning it on by default on 16.04, optionally on older Ubuntus.

Now, base/cmake and orogen are two packages that are used outside of Rock, are used within Rock on older installations and older ubuntus. There is virtually no cost into keeping the current behavior and enabling it at the autoproj level for 16.04.


if(ROCK_USE_CXX11)
rock_activate_cxx11()
endif()
Expand Down