mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Fix building for clang-900.0.39.2 (OSX 10.12), tnx to michaelld
This commit is contained in:
parent
b5c9015fbe
commit
6dfacb1676
@ -62,6 +62,7 @@ endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
# Enable C++17 support in GCC >= 8.0.0
|
# Enable C++17 support in GCC >= 8.0.0
|
||||||
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
|
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
|
||||||
# Fallback to C++11 when using GCC < 6.1.1
|
# Fallback to C++11 when using GCC < 6.1.1
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||||
@ -75,8 +76,8 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
|||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||||
|
|
||||||
# Enable C++17 support in Clang >= 6.0.0 or AppleClang >= 900
|
# Enable C++17 support in Clang >= 6.0.0
|
||||||
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or 900 > AppleClang >= 600
|
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or AppleClang >= 600
|
||||||
# Fallback to C++11 if older version
|
# Fallback to C++11 if older version
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
@ -84,11 +85,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
if(CLANG_VERSION VERSION_LESS "600")
|
if(CLANG_VERSION VERSION_LESS "600")
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||||
else(CLANG_VERSION VERSION_LESS "600")
|
else(CLANG_VERSION VERSION_LESS "600")
|
||||||
if(CLANG_VERSION VERSION_LESS "900")
|
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||||
else(CLANG_VERSION VERSION_LESS "900")
|
|
||||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
|
||||||
endif(CLANG_VERSION VERSION_LESS "900")
|
|
||||||
endif(CLANG_VERSION VERSION_LESS "600")
|
endif(CLANG_VERSION VERSION_LESS "600")
|
||||||
else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||||
|
Loading…
Reference in New Issue
Block a user