1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-27 05:27:40 +00:00

Fix building for Boost < 1.66

This commit is contained in:
Carles Fernandez
2019-05-08 16:15:59 +02:00
parent 40f0a93695
commit 214c9d5de0
12 changed files with 81 additions and 11 deletions

View File

@@ -93,6 +93,13 @@ target_include_directories(tracking_libs
${OPT_TRACKING_INCLUDES}
)
if(Boost_VERSION VERSION_GREATER "1.65")
target_compile_definitions(tracking_libs
PUBLIC
-DBOOST_GREATER_1_65
)
endif()
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang
target_compile_definitions(tracking_libs

View File

@@ -36,6 +36,12 @@
#include <boost/array.hpp>
#include <boost/asio.hpp>
#if BOOST_GREATER_1_65
using b_io_context = boost::asio::io_context;
#else
using b_io_context = boost::asio::io_service;
#endif
#define NUM_TX_VARIABLES_GALILEO_E1 13
#define NUM_TX_VARIABLES_GPS_L1_CA 9
#define NUM_RX_VARIABLES 4
@@ -55,7 +61,7 @@ public:
void close_tcp_connection(size_t d_port_);
private:
boost::asio::io_context io_context_;
b_io_context io_context_;
boost::asio::ip::tcp::socket tcp_socket_;
};