mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-06 02:03:04 +00:00
Improve handling of the filesystem library
This commit is contained in:
@@ -18,16 +18,6 @@ else()
|
||||
add_library(obs_gr_blocks hybrid_observables_gs.cc hybrid_observables_gs.h)
|
||||
endif()
|
||||
|
||||
if(${FILESYSTEM_FOUND})
|
||||
target_compile_definitions(obs_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM=1)
|
||||
if(${find_experimental})
|
||||
target_compile_definitions(obs_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
|
||||
endif()
|
||||
target_link_libraries(obs_gr_blocks PRIVATE std::filesystem)
|
||||
else()
|
||||
target_link_libraries(obs_gr_blocks PRIVATE Boost::filesystem)
|
||||
endif()
|
||||
|
||||
target_include_directories(obs_gr_blocks
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "gnss_circular_deque.h"
|
||||
#include "gnss_frequencies.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gnss_sdr_filesystem.h"
|
||||
#include "gnss_sdr_make_unique.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
@@ -38,27 +39,6 @@
|
||||
#include <boost/bind/bind.hpp>
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#if HAS_STD_FILESYSTEM
|
||||
#include <system_error>
|
||||
namespace errorlib = std;
|
||||
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
|
||||
#include <experimental/filesystem>
|
||||
namespace fs = std::experimental::filesystem;
|
||||
#else
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
#endif
|
||||
#else
|
||||
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <boost/system/error_code.hpp> // for error_code
|
||||
namespace fs = boost::filesystem;
|
||||
namespace errorlib = boost::system;
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
|
||||
hybrid_observables_gs_sptr hybrid_observables_gs_make(const Obs_Conf &conf_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user