diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 8b9f0ba..8ae7933 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -12,6 +12,7 @@ jobs: matrix: rosdistro: ['noetic'] gcc: ['8', '9', '10'] + cxx: ['11', '14', '17'] container: ros:${{ matrix.rosdistro }}-ros-base-focal name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} steps: @@ -35,7 +36,7 @@ jobs: run: sudo apt install -y libgoogle-glog-dev - name: Build lpp - run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash + run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash working-directory: catkin_ws shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index b09bffa..262d95a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) endif () # Set standard of top level project or C++17 -if (NOT DEFINED ${CMAKE_CXX_STANDARD}) +if (NOT DEFINED CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) else () set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD})