update C++ standard (c++11 -> c++14)

- temporarily disable snapdragon builds until toolchain is updated
This commit is contained in:
Daniel Agar
2020-01-21 21:49:10 -05:00
committed by GitHub
parent cf195b0755
commit b47eaa6061
10 changed files with 17 additions and 13 deletions
@@ -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()