1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-15 14:47:19 +00:00

Unify criteria in target definitions, more informative names

This commit is contained in:
Carles Fernandez
2020-06-13 00:32:40 +02:00
parent 226689c359
commit 0df4277d36
96 changed files with 189 additions and 159 deletions

View File

@@ -125,7 +125,7 @@ set(SIGNAL_SOURCE_ADAPTER_HEADERS
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
list(SORT SIGNAL_SOURCE_ADAPTER_SOURCES)
if(CMAKE_VERSION VERSION_GREATER 3.13)
if(USE_CMAKE_TARGET_SOURCES)
add_library(signal_source_adapters STATIC)
target_sources(signal_source_adapters
PRIVATE

View File

@@ -43,7 +43,7 @@ set(SIGNAL_SOURCE_GR_BLOCKS_HEADERS
list(SORT SIGNAL_SOURCE_GR_BLOCKS_HEADERS)
list(SORT SIGNAL_SOURCE_GR_BLOCKS_SOURCES)
if(CMAKE_VERSION VERSION_GREATER 3.13)
if(USE_CMAKE_TARGET_SOURCES)
add_library(signal_source_gr_blocks STATIC)
target_sources(signal_source_gr_blocks
PRIVATE
@@ -104,21 +104,21 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()
endif()
if(Boost_VERSION_STRING VERSION_GREATER 1.65.99)
if(USE_BOOST_ASIO_IO_CONTEXT)
target_compile_definitions(signal_source_gr_blocks
PUBLIC
-DBOOST_GREATER_1_65
-DUSE_BOOST_ASIO_IO_CONTEXT
)
endif()
if(Boost_VERSION_STRING VERSION_GREATER 1.72.99)
if(USE_BOOST_BIND_PLACEHOLDERS)
target_compile_definitions(signal_source_gr_blocks
PRIVATE
-DBOOST_173_OR_GREATER=1
-DUSE_BOOST_BIND_PLACEHOLDERS=1
)
endif()
if(CMAKE_VERSION VERSION_GREATER 3.1 AND NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)))
if(USE_GENERIC_LAMBDAS)
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)
target_compile_definitions(signal_source_gr_blocks

View File

@@ -134,7 +134,7 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
}
// 6. Start reading
#if BOOST_173_OR_GREATER
#if USE_BOOST_BIND_PLACEHOLDERS
boost::asio::async_read(socket_, boost::asio::buffer(data_),
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2)); // NOLINT(modernize-avoid-bind)
#else
@@ -319,7 +319,7 @@ void rtl_tcp_signal_source_c::handle_read(const boost::system::error_code &ec,
// let woker know that more data is available
not_empty_.notify_one();
// Read some more
#if BOOST_173_OR_GREATER
#if USE_BOOST_BIND_PLACEHOLDERS
boost::asio::async_read(socket_,
boost::asio::buffer(data_),
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2)); // NOLINT(modernize-avoid-bind)

View File

@@ -51,7 +51,7 @@ using rtl_tcp_signal_source_c_sptr = std::shared_ptr<rtl_tcp_signal_source_c>;
using rtl_tcp_signal_source_c_sptr = boost::shared_ptr<rtl_tcp_signal_source_c>;
#endif
#if BOOST_GREATER_1_65
#if USE_BOOST_ASIO_IO_CONTEXT
using b_io_context = boost::asio::io_context;
#else
using b_io_context = boost::asio::io_service;

View File

@@ -36,7 +36,7 @@ set(SIGNAL_SOURCE_LIB_HEADERS
list(SORT SIGNAL_SOURCE_LIB_HEADERS)
list(SORT SIGNAL_SOURCE_LIB_SOURCES)
if(CMAKE_VERSION VERSION_GREATER 3.13)
if(USE_CMAKE_TARGET_SOURCES)
add_library(signal_source_libs STATIC)
target_sources(signal_source_libs
PRIVATE