From f4e1f508245d8af21f8167a348a99ba016dc634e Mon Sep 17 00:00:00 2001 From: Naoki Mizuno Date: Sun, 9 Dec 2018 06:35:08 +0900 Subject: [PATCH] Fix compilation error on Ubuntu 18.04 (ROS Melodic) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8297219..7f6b833 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.1.3) project(loam_velodyne) find_package(catkin REQUIRED COMPONENTS @@ -29,7 +29,8 @@ catkin_package( ## Compile as C++14, supported in ROS Kinetic and newer # set_property(TARGET invz_player PROPERTY CXX_STANDARD 17) -add_compile_options(-std=c++14) +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) add_definitions( -march=native )