1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 19:50:34 +00:00

Fix building against GNU Radio master (currently 3.10.0.git), since it breaks when the C++ standard is C++20

This commit is contained in:
Carles Fernandez 2021-10-27 18:58:55 +02:00
parent 51ecf9998d
commit 272db9ce59
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -645,8 +645,9 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
if(FILESYSTEM_FOUND)
set(CMAKE_CXX_STANDARD 17)
if(CMAKE_VERSION VERSION_GREATER 3.13)
# UHD 4.0.0.0 still does not support C++20
if((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_LESS 3.99)))
# UHD 4.0.0.0 does not support C++20
# GNU Radio 3.10.0.git does not support C++20
if(((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_LESS 3.99))) AND (GNURADIO_VERSION VERSION_LESS 3.9.99))
set(CMAKE_CXX_STANDARD 20)
if(CMAKE_VERSION VERSION_GREATER 3.20.99)
if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0.0")) OR