mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Check if the compiler has the <span> header
This commit is contained in:
parent
751f54990c
commit
9b3fd32f43
@ -92,7 +92,15 @@ else()
|
|||||||
target_link_libraries(algorithms_libs PRIVATE Boost::filesystem Boost::system)
|
target_link_libraries(algorithms_libs PRIVATE Boost::filesystem Boost::system)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT (CMAKE_CXX_STANDARD VERSION_LESS 20))
|
include(CheckCXXSourceCompiles)
|
||||||
|
check_cxx_source_compiles("
|
||||||
|
#include <span>
|
||||||
|
int main()
|
||||||
|
{ std::span<float> sv; }"
|
||||||
|
has_span
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${has_span})
|
||||||
target_compile_definitions(algorithms_libs PUBLIC -DHAS_SPAN=1)
|
target_compile_definitions(algorithms_libs PUBLIC -DHAS_SPAN=1)
|
||||||
else()
|
else()
|
||||||
target_include_directories(algorithms_libs
|
target_include_directories(algorithms_libs
|
||||||
|
Loading…
Reference in New Issue
Block a user