mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-12 04:49:50 +08:00
fixed g2o build with c++14 #681
This commit is contained in:
+4
-4
@@ -620,19 +620,19 @@ IF(WITH_ORB_SLAM2 AND NOT G2O_FOUND)
|
|||||||
ENDIF(ORB_SLAM2_FOUND)
|
ENDIF(ORB_SLAM2_FOUND)
|
||||||
ENDIF(WITH_ORB_SLAM2 AND NOT G2O_FOUND)
|
ENDIF(WITH_ORB_SLAM2 AND NOT G2O_FOUND)
|
||||||
|
|
||||||
IF(loam_velodyne_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR TORCH_FOUND)
|
IF(loam_velodyne_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR TORCH_FOUND OR G2O_FOUND)
|
||||||
#LOAM and PCL>=1.10 require c++14
|
#LOAM, PCL>=1.10 and latest g2o require c++14
|
||||||
IF(NOT MSVC)
|
IF(NOT MSVC)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
|
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
|
||||||
IF(COMPILER_SUPPORTS_CXX14)
|
IF(COMPILER_SUPPORTS_CXX14)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
ELSE()
|
ELSE()
|
||||||
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler if you want to use LOAM (set \"-DWITH_LOAM=OFF\" to build without LOAM).")
|
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler if you want to use LOAM (set \"-DWITH_LOAM=OFF\" to build without LOAM).")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF(G2O_FOUND OR
|
ELSEIF(GTSAM_FOUND OR
|
||||||
GTSAM_FOUND OR
|
|
||||||
CERES_FOUND OR
|
CERES_FOUND OR
|
||||||
ZED_FOUND OR
|
ZED_FOUND OR
|
||||||
ANDROID OR
|
ANDROID OR
|
||||||
|
|||||||
Reference in New Issue
Block a user