1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00
This commit is contained in:
Carles Fernandez 2019-02-18 05:52:00 +01:00
commit c702b79ccd
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -410,42 +410,9 @@ endif()
################################################################################ ################################################################################
# Set C and C++ standard # Set C and C++ standard
################################################################################ ################################################################################
# Support of C++17 is still not possible due to pm_remez.h (solved in GNU Radio 3.8)
# Enable C++14 support in GCC >= 6.1.1
# Fallback to C++11 when using GCC < 6.1.1
if(NOT (CMAKE_VERSION VERSION_LESS "3.1")) if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) set(CMAKE_CXX_STANDARD 14)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
set(CMAKE_CXX_STANDARD 11)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(OS_IS_MACOSX)
# See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences
if(CLANG_VERSION VERSION_LESS "600")
set(CMAKE_CXX_STANDARD 11)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
set(CMAKE_CXX_STANDARD 11)
else()
# if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
set(CMAKE_CXX_STANDARD 14)
# else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
# set(CMAKE_CXX_STANDARD 17)
# endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
endif()
endif()
endif()
if((NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)))
set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
else() else()
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)