1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-17 15:24:56 +00:00

Fix building when compilers have a C++ standard below C++11

This commit is contained in:
Carles Fernandez 2017-08-23 19:04:11 +02:00 committed by Damian Miralles
parent 0a8d5e4ffd
commit fa8cb9dd5c
2 changed files with 1 additions and 31 deletions

View File

@ -582,34 +582,6 @@ if(NOT VOLK_GNSSSDR_FOUND)
endif(CMAKE_GENERATOR STREQUAL Xcode)
endif(OS_IS_MACOSX)
set(C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(OS_IS_LINUX)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
endif(OS_IS_LINUX)
if(OS_IS_MACOSX)
if(CLANG_VERSION VERSION_LESS "600")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else(CLANG_VERSION VERSION_LESS "600")
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif(CLANG_VERSION VERSION_LESS "600")
endif(OS_IS_MACOSX)
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CROSSCOMPILING)
set(VOLK_GNSSSDR_COMPILER "")
else(CMAKE_CROSSCOMPILING)
@ -619,8 +591,6 @@ if(NOT VOLK_GNSSSDR_FOUND)
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
-DENABLE_STATIC_LIBS=ON
-DENABLE_PROFILING=${ENABLE_PROFILING}
-DCMAKE_CXX_FLAGS=${CXX_FLAGS}
-DCMAKE_C_FLAGS=${C_FLAGS}
-DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR}
-DENABLE_ORC=OFF
${STRIP_VOLK_GNSSSDR_PROFILE}

View File

@ -27,7 +27,7 @@ enable_language(CXX)
enable_language(C)
enable_testing()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)