Skip to content

Commit

Permalink
Build with default C++ (14 in noetic or 17 on newer systems), boost::…
Browse files Browse the repository at this point in the history
…placeholders::_1 instead of _1, and use new ogre_vector.h to handle deprecation of OgreVector3.h
  • Loading branch information
lucasw committed May 24, 2022
1 parent 2a937c0 commit a6308cd
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 24 deletions.
3 changes: 1 addition & 2 deletions grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_core)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -158,4 +157,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
1 change: 0 additions & 1 deletion grid_map_costmap_2d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_costmap_2d)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
3 changes: 1 addition & 2 deletions grid_map_cv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_cv)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -135,4 +134,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
2 changes: 1 addition & 1 deletion grid_map_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_demos)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
2 changes: 1 addition & 1 deletion grid_map_filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5.1)
project(grid_map_filters)

# Better with serial algorithms.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# We want performance (fast-math) but also need a representation for NaN values to represent missing values.
# Therefore, we disable the finite-math-only flag that was set by fast-math.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -fno-finite-math-only")
Expand Down
3 changes: 1 addition & 2 deletions grid_map_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_loader)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -107,4 +106,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
3 changes: 1 addition & 2 deletions grid_map_octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_octomap)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -133,4 +132,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
2 changes: 1 addition & 1 deletion grid_map_pcl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_pcl)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
add_compile_options(-Wall -Wextra -Wpedantic)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down
3 changes: 1 addition & 2 deletions grid_map_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_ros)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -143,4 +142,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)
1 change: 0 additions & 1 deletion grid_map_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_rviz_plugin)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <grid_map_core/GridMap.hpp>

namespace Ogre {
class Vector3;
class Quaternion;
class ManualObject;
class ColourValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <tf2_ros/buffer.h>
#include <geometry_msgs/Pose.h>

#include <OgreVector3.h>
#include <rviz/ogre_helpers/ogre_vector.h>
#include <OgreQuaternion.h>

#include <boost/thread/mutex.hpp>
Expand Down Expand Up @@ -192,9 +192,11 @@ class FrameManager : public QObject
template <class M>
void registerFilterForTransformStatusCheck(tf2_ros::MessageFilter<M>* filter, Display* display)
{
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this, _1, display));
filter->registerCallback(boost::bind(&FrameManager::messageCallback<M>, this,
boost::placeholders::_1, display));
filter->registerFailureCallback(boost::bind(
&FrameManager::failureCallback<M, tf2_ros::FilterFailureReason>, this, _1, _2, display));
&FrameManager::failureCallback<M, tf2_ros::FilterFailureReason>, this,
boost::placeholders::_1, boost::placeholders::_2, display));
}

/** @brief Return the current fixed frame name. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class MessageFilterDisplay : public _RosTopicDisplay {
tf_filter_ = new tf2_ros::MessageFilter<MessageType>(*context_->getTF2BufferPtr(), fixed_frame_.toStdString(), 1u, update_nh_);

tf_filter_->connectInput(sub_);
tf_filter_->registerCallback(boost::bind(&MessageFilterDisplay<MessageType>::incomingMessage, this, _1));
tf_filter_->registerCallback(boost::bind(&MessageFilterDisplay<MessageType>::incomingMessage, this,
boost::placeholders::_1));
context_->getFrameManager()->registerFilterForTransformStatusCheck(tf_filter_, this);
}

Expand Down
4 changes: 2 additions & 2 deletions grid_map_rviz_plugin/src/GridMapVisual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <OGRE/OgreSceneNode.h>
#include <OGRE/OgreTechnique.h>
#include <OGRE/OgreTextureManager.h>
#include <OGRE/OgreVector3.h>
#include <rviz/ogre_helpers/billboard_line.h>
#include <rviz/ogre_helpers/ogre_vector.h>
#include <rviz/uniform_string_stream.h>
#include <chrono>

Expand Down Expand Up @@ -412,4 +412,4 @@ Ogre::ColourValue GridMapVisual::getInterpolatedColor(float intensity, Ogre::Col
return color;
}

} // namespace grid_map_rviz_plugin
} // namespace grid_map_rviz_plugin
3 changes: 1 addition & 2 deletions grid_map_visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
project(grid_map_visualization)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -145,4 +144,4 @@ if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
endif(cmake_clang_tools_FOUND)

0 comments on commit a6308cd

Please sign in to comment.