mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 13:07:34 +08:00
update C++ standard (c++11 -> c++14)
- temporarily disable snapdragon builds until toolchain is updated
This commit is contained in:
@@ -38,15 +38,15 @@ project(micrortps_agent)
|
||||
find_package(fastrtps REQUIRED)
|
||||
find_package(fastcdr REQUIRED)
|
||||
|
||||
# Set C++11
|
||||
# Set C++14
|
||||
include(CheckCXXCompilerFlag)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
check_cxx_compiler_flag(--std=c++11 SUPPORTS_CXX11)
|
||||
check_cxx_compiler_flag(--std=c++14 SUPPORTS_CXX14)
|
||||
if(SUPPORTS_CXX11)
|
||||
add_compile_options(--std=c++11)
|
||||
add_compile_options(--std=c++14)
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler doesn't support C++11")
|
||||
message(FATAL_ERROR "Compiler doesn't support C++14")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user