-
Notifications
You must be signed in to change notification settings - Fork 31
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
Set C++ 11 #6
Set C++ 11 #6
Conversation
Mostly so that I can see build failures.
2 things:
|
Disregard my first comment -- looks like roscpp is hard coding C++11 -- so I guess we'll be OK. Second comment remains. |
I don't mind getting the emails, etc, so I'm happy to stay on. Otherwise, I don't mind. |
Ok -- I'll let that run through CI -- if it passes on Melodic and Lunar, I'll cut a new release. (I think we should also switch slam_karto to melodic-devel branch for Lunar once this is released)( |
@@ -1,6 +1,8 @@ | |||
cmake_minimum_required(VERSION 2.8.3) | |||
project(sparse_bundle_adjustment) | |||
|
|||
add_compile_options(-std=c++11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CMake recommended way is now:
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
This works cross platform and allows to override it if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I thought I remembered seeing a recommended way...
I just checked tf and went with the way it was done there.
Thanks @dirk-thomas -- I'll update to that |
One note for posterity: CMAKE_CXX_STANDARD requires CMAKE > 3.1, so old CMakeLists needs to be updated to have new minimum version |
CMake >= 3.1 😉 |
0.4.2 is out for lunar, coming for melodic momentarily |
Because @lucbettaieb said he got an email about:
http://build.ros.org/job/Ldev__sparse_bundle_adjustment__ubuntu_xenial_amd64/3/
@mikeferguson I also added myself as a maintainer. I'm taking care of whatever the fetch_ros packages depend on.