From 3e7a0b7dbd3830e932c2bee62da9ffb1c53daf6c Mon Sep 17 00:00:00 2001 From: yunchang Date: Sun, 29 Oct 2023 09:47:34 -0400 Subject: [PATCH] compiles on noetic --- factor_handlers/CMakeLists.txt | 16 +++++----------- install/lamp_http.rosinstall | 2 +- install/lamp_ssh.rosinstall | 2 +- lamp/CMakeLists.txt | 16 +++++----------- lamp_utils/include/lamp_utils/gicp.h | 8 ++++---- pose_graph_visualizer/CMakeLists.txt | 16 +++++----------- 6 files changed, 21 insertions(+), 39 deletions(-) diff --git a/factor_handlers/CMakeLists.txt b/factor_handlers/CMakeLists.txt index 9d4df885..3372570d 100644 --- a/factor_handlers/CMakeLists.txt +++ b/factor_handlers/CMakeLists.txt @@ -7,6 +7,11 @@ project(factor_handlers) SET(CMAKE_BUILD_TYPE Release) +add_compile_options(-Wall -Wextra) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + find_package(GTSAM REQUIRED) if (NOT GTSAM_FOUND) message(FATAL_ERROR "This program requires the GTSAM library.") @@ -59,17 +64,6 @@ catkin_package( Boost ) -include(CheckCXXCompilerFlag) -check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11) -check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X) -if (COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -else() - message(FATAL_ERROR "${CMAKE_CXX_COMPILER} doesn't provide c++11 support.") -endif() - include_directories(include ${catkin_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) link_directories(${catkin_LIBRARY_DIRS} ${GTSAM_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) add_library(${PROJECT_NAME} diff --git a/install/lamp_http.rosinstall b/install/lamp_http.rosinstall index 5a0bd613..d0549455 100644 --- a/install/lamp_http.rosinstall +++ b/install/lamp_http.rosinstall @@ -1,7 +1,7 @@ - git: local-name: gtsam uri: https://github.com/borglab/gtsam.git - version: develop + version: 4.2a9 - git: local-name: kimera_rpgo uri: https://github.com/MIT-SPARK/Kimera-RPGO.git diff --git a/install/lamp_ssh.rosinstall b/install/lamp_ssh.rosinstall index 5816762f..a9a28702 100644 --- a/install/lamp_ssh.rosinstall +++ b/install/lamp_ssh.rosinstall @@ -1,7 +1,7 @@ - git: local-name: gtsam uri: git@github.com:borglab/gtsam.git - version: develop + version: 4.2a9 - git: local-name: kimera_rpgo uri: git@github.com:MIT-SPARK/Kimera-RPGO.git diff --git a/lamp/CMakeLists.txt b/lamp/CMakeLists.txt index 2c80a153..458debfb 100644 --- a/lamp/CMakeLists.txt +++ b/lamp/CMakeLists.txt @@ -7,6 +7,11 @@ project(lamp) SET(CMAKE_BUILD_TYPE Release) +add_compile_options(-Wall -Wextra) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + find_package(GTSAM REQUIRED) if (NOT GTSAM_FOUND) message(FATAL_ERROR "This program requires the GTSAM library.") @@ -65,17 +70,6 @@ catkin_package( Boost ) -include(CheckCXXCompilerFlag) -check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11) -check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X) -if (COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -else() - message(FATAL_ERROR "${CMAKE_CXX_COMPILER} doesn't provide c++11 support.") -endif() - include_directories(include ${catkin_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) link_directories(${catkin_LIBRARY_DIRS} ${GTSAM_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) add_library(${PROJECT_NAME} src/LampRobot.cc src/LampBase.cc src/LampBaseStation.cc) diff --git a/lamp_utils/include/lamp_utils/gicp.h b/lamp_utils/include/lamp_utils/gicp.h index 5c6de5b7..6d52b9be 100644 --- a/lamp_utils/include/lamp_utils/gicp.h +++ b/lamp_utils/include/lamp_utils/gicp.h @@ -163,10 +163,10 @@ class MultithreadedGeneralizedIterativeClosestPoint /** \brief Provide a pointer to the input dataset * \param cloud the const boost shared pointer to a PointCloud message */ - PCL_DEPRECATED( - "[pcl::registration::MultithreadedGeneralizedIterativeClosestPoint::" - "setInputCloud] setInputCloud is deprecated. Please use setInputSource " - "instead.") + // PCL_DEPRECATED( + // "[pcl::registration::MultithreadedGeneralizedIterativeClosestPoint::" + // "setInputCloud] setInputCloud is deprecated. Please use setInputSource " + // "instead.") void setInputCloud(const PointCloudSourceConstPtr& cloud); /** \brief Provide a pointer to the input dataset diff --git a/pose_graph_visualizer/CMakeLists.txt b/pose_graph_visualizer/CMakeLists.txt index 0ca7ef7e..143a8afb 100644 --- a/pose_graph_visualizer/CMakeLists.txt +++ b/pose_graph_visualizer/CMakeLists.txt @@ -5,6 +5,11 @@ IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release) ENDIF() +add_compile_options(-Wall -Wextra) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + find_package(PCL 1.7 REQUIRED COMPONENTS common) if(NOT PCL_FOUND) message(FATAL_ERROR "This program requires the PCL library.") @@ -46,17 +51,6 @@ endif(NOT GTSAM_FOUND) find_package(Boost 1.58 COMPONENTS filesystem program_options timer REQUIRED) -include(CheckCXXCompilerFlag) -check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11) -check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X) -if (COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") -else() - message(FATAL_ERROR "${CMAKE_CXX_COMPILER} doesn't provide c++11 support.") -endif() - include_directories( include ${catkin_INCLUDE_DIRS}