mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Enable C++20 when possible
Pass CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to volk_gnsssdr
This commit is contained in:
parent
2bab3b8863
commit
7eef89349a
@ -667,19 +667,17 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND (LOG4CPP_READY_FOR_CXX17 OR GNURA
|
|||||||
endif()
|
endif()
|
||||||
if(FILESYSTEM_FOUND)
|
if(FILESYSTEM_FOUND)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
# if(CMAKE_VERSION VERSION_GREATER 3.13)
|
if(CMAKE_VERSION VERSION_GREATER 3.13)
|
||||||
# UHD 3.15.0.0-5 does not support C++20
|
if(((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_GREATER 4.2.99))) AND (GNURADIO_VERSION VERSION_GREATER 3.10.3.99))
|
||||||
# GNU Radio 3.10.0.git does not support C++20
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
# if(((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_LESS 3.14.99))) AND (GNURADIO_VERSION VERSION_LESS 3.9.99))
|
# if(CMAKE_VERSION VERSION_GREATER 3.20.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
|
# if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0.0")) OR
|
||||||
# ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")))
|
# ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")))
|
||||||
# set(CMAKE_CXX_STANDARD 23)
|
# set(CMAKE_CXX_STANDARD 23)
|
||||||
# endif()
|
# endif()
|
||||||
# endif()
|
# endif()
|
||||||
# endif()
|
endif()
|
||||||
# endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -1109,9 +1107,9 @@ if(NOT VOLKGNSSSDR_FOUND)
|
|||||||
|
|
||||||
set(STRIP_VOLK_GNSSSDR_PROFILE "")
|
set(STRIP_VOLK_GNSSSDR_PROFILE "")
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=${ENABLE_STRIP}")
|
set(STRIP_VOLK_GNSSSDR_PROFILE -DENABLE_STRIP=${ENABLE_STRIP})
|
||||||
if(ENABLE_PACKAGING)
|
if(ENABLE_PACKAGING)
|
||||||
set(STRIP_VOLK_GNSSSDR_PROFILE "${STRIP_VOLK_GNSSSDR_PROFILE} -DCMAKE_VERBOSE_MAKEFILE=ON")
|
set(STRIP_VOLK_GNSSSDR_PROFILE ${STRIP_VOLK_GNSSSDR_PROFILE} -DCMAKE_VERBOSE_MAKEFILE=ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -1156,6 +1154,8 @@ if(NOT VOLKGNSSSDR_FOUND)
|
|||||||
-DENABLE_ORC=${ORC_ENABLED}
|
-DENABLE_ORC=${ORC_ENABLED}
|
||||||
${STRIP_VOLK_GNSSSDR_PROFILE}
|
${STRIP_VOLK_GNSSSDR_PROFILE}
|
||||||
${USE_THIS_PYTHON}
|
${USE_THIS_PYTHON}
|
||||||
|
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
|
||||||
|
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ENABLE_PACKAGING)
|
if(ENABLE_PACKAGING)
|
||||||
|
Loading…
Reference in New Issue
Block a user