Skip to content

Commit

Permalink
Merge pull request #581 from tongtybj/PR/c++17
Browse files Browse the repository at this point in the history
[CMake] using C++17 for related packages
  • Loading branch information
tongtybj committed Nov 28, 2023
2 parents 819c971 + 2ec2abe commit a9670ff
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ if [ ${ROS_DISTRO} = 'kinetic' ]; then
wget https://raw.githubusercontent.com/osrf/gazebo_models/master/ground_plane/model.config -P ${path}
fi

if [[ "$ROS_DISTRO" = "kinetic" ]]; then
# to use c++17
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y g++-7
export CXX='g++-7'
export CC='gcc-7'
fi

# Build
catkin config --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
catkin build -p1 -j1 --no-status
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find_package(catkin REQUIRED COMPONENTS

catkin_python_setup()

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

catkin_package(
INCLUDE_DIRS include
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(aerial_robot_control)

add_compile_options(-std=c++11)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_estimation
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_estimation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(aerial_robot_estimation)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_model
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_kinetic.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- git:
local-name: aerial_robot_3rdparty
uri: https://github.com/JSKAerialRobot/aerial_robot_3rdparty.git
version: fb963df
version: b10f5bf

# kalman filter
- git:
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_melodic.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- git:
local-name: aerial_robot_3rdparty
uri: https://github.com/JSKAerialRobot/aerial_robot_3rdparty.git
version: fb963df
version: b10f5bf

# kalman filter
- git:
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_model/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(aerial_robot_model)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_noetic.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- git:
local-name: aerial_robot_3rdparty
uri: https://github.com/JSKAerialRobot/aerial_robot_3rdparty.git
version: fb963df
version: b10f5bf

# kalman filter
- git:
Expand Down
2 changes: 1 addition & 1 deletion aerial_robot_simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(aerial_robot_simulation)

add_compile_options(-std=c++11 ${GAZEBO_CXX_FLAGS})
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_base
Expand Down
2 changes: 1 addition & 1 deletion robots/dragon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(dragon)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_control
Expand Down
2 changes: 1 addition & 1 deletion robots/hydrus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(hydrus)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down
2 changes: 1 addition & 1 deletion robots/hydrus_xi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.2)
project(hydrus_xi)

add_compile_options(-std=c++14)
add_compile_options(-std=c++17)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_base
Expand Down

0 comments on commit a9670ff

Please sign in to comment.