1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Make use of std::lcm instead of Boost when possible

This commit is contained in:
Carles Fernandez 2022-08-26 09:43:11 +02:00
parent 268dbbc61f
commit 182b87c022
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 28 additions and 4 deletions

View File

@ -32,11 +32,18 @@ target_include_directories(pvt_adapters
${GNSSSDR_SOURCE_DIR}/src/core/interfaces
)
if(USE_OLD_BOOST_MATH_COMMON_FACTOR)
if((NOT (CMAKE_VERSION VERSION_LESS "3.1")) AND NOT (CMAKE_CXX_STANDARD VERSION_LESS 17))
target_compile_definitions(pvt_adapters
PRIVATE
-DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1
-DUSE_STD_COMMON_FACTOR=1
)
else()
if(USE_OLD_BOOST_MATH_COMMON_FACTOR)
target_compile_definitions(pvt_adapters
PRIVATE
-DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1
)
endif()
endif()
if(ENABLE_CLANG_TIDY)

View File

@ -28,6 +28,10 @@
#include "rtklib_rtkpos.h" // for rtkfree, rtkinit
#include <glog/logging.h> // for LOG
#include <iostream> // for std::cout
#if USE_STD_COMMON_FACTOR
#include <numeric>
namespace bc = std;
#else
#if USE_OLD_BOOST_MATH_COMMON_FACTOR
#include <boost/math/common_factor_rt.hpp>
namespace bc = boost::math;
@ -35,6 +39,7 @@ namespace bc = boost::math;
#include <boost/integer/common_factor_rt.hpp>
namespace bc = boost::integer;
#endif
#endif
using namespace std::string_literals;

View File

@ -74,11 +74,18 @@ if(ENABLE_CLANG_TIDY)
endif()
endif()
if(USE_OLD_BOOST_MATH_COMMON_FACTOR)
if((NOT (CMAKE_VERSION VERSION_LESS "3.1")) AND NOT (CMAKE_CXX_STANDARD VERSION_LESS 17))
target_compile_definitions(pvt_gr_blocks
PRIVATE
-DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1
-DUSE_STD_COMMON_FACTOR=1
)
else()
if(USE_OLD_BOOST_MATH_COMMON_FACTOR)
target_compile_definitions(pvt_gr_blocks
PRIVATE
-DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1
)
endif()
endif()
if(USE_BOOST_BIND_PLACEHOLDERS)

View File

@ -86,6 +86,10 @@
#include <boost/bind/bind.hpp>
#endif
#if USE_STD_COMMON_FACTOR
#include <numeric>
namespace bc = std;
#else
#if USE_OLD_BOOST_MATH_COMMON_FACTOR
#include <boost/math/common_factor_rt.hpp>
namespace bc = boost::math;
@ -93,6 +97,7 @@ namespace bc = boost::math;
#include <boost/integer/common_factor_rt.hpp>
namespace bc = boost::integer;
#endif
#endif
#if PMT_USES_BOOST_ANY
#include <boost/any.hpp>