1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-31 11:19:18 +00:00

Activate usage of boost::endian if available

This commit is contained in:
Carles Fernandez 2022-12-05 16:17:54 +01:00
parent 4f08c7a88f
commit c9a845ab3d
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -5,14 +5,11 @@
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
set(OPT_DRIVER_SOURCES "")
set(OPT_DRIVER_HEADERS "")
if(ENABLE_RAW_UDP AND PCAP_FOUND) if(ENABLE_RAW_UDP AND PCAP_FOUND)
set(OPT_DRIVER_SOURCES gr_complex_ip_packet_source.cc) list(APPEND OPT_DRIVER_SOURCES gr_complex_ip_packet_source.cc)
set(OPT_DRIVER_HEADERS gr_complex_ip_packet_source.h) list(APPEND OPT_DRIVER_HEADERS gr_complex_ip_packet_source.h)
endif() endif()
set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
fifo_reader.cc fifo_reader.cc
unpack_byte_2bit_samples.cc unpack_byte_2bit_samples.cc
@ -26,7 +23,6 @@ set(SIGNAL_SOURCE_GR_BLOCKS_SOURCES
${OPT_DRIVER_SOURCES} ${OPT_DRIVER_SOURCES}
) )
set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
fifo_reader.h fifo_reader.h
unpack_byte_2bit_samples.h unpack_byte_2bit_samples.h
@ -134,6 +130,17 @@ else()
) )
endif() endif()
if(Boost_VERSION_STRING VERSION_GREATER "1.57.99")
target_compile_definitions(signal_source_gr_blocks
PRIVATE
-DHAS_BOOST_ENDIAN=1
)
target_link_libraries(signal_source_gr_blocks
PRIVATE
Boost::headers
)
endif()
if(ENABLE_CLANG_TIDY) if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE) if(CLANG_TIDY_EXE)
set_target_properties(signal_source_gr_blocks set_target_properties(signal_source_gr_blocks