1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-06 01:56:25 +00:00
This commit is contained in:
Carles Fernandez 2019-06-13 15:38:39 +02:00
commit a91325152e
37 changed files with 302 additions and 120 deletions

View File

@ -752,18 +752,34 @@ endif()
################################################################################
# Log4cpp - http://log4cpp.sourceforge.net/
################################################################################
find_package(LOG4CPP)
set_package_properties(LOG4CPP PROPERTIES
URL "http://log4cpp.sourceforge.net/"
DESCRIPTION "Library of C++ classes for flexible logging to files"
PURPOSE "Required by GNU Radio."
TYPE REQUIRED
)
if(NOT LOG4CPP_FOUND)
message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr")
endif()
################################################################################
# Dectect availability of std::filesystem
################################################################################
set(FILESYSTEM_FOUND FALSE)
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8))
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
# Check if we have std::filesystem
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
if(NOT ENABLE_UNIT_TESTING_EXTRA) # Workaround for GPSTk
find_package(FILESYSTEM)
find_package(FILESYSTEM COMPONENTS Final Experimental)
set_package_properties(FILESYSTEM PROPERTIES
URL "https://en.cppreference.com/w/cpp/filesystem"
DESCRIPTION "Provides facilities for performing operations on file systems and their components"
@ -894,8 +910,6 @@ endif()
################################################################################
# VOLK - Vector-Optimized Library of Kernels
################################################################################
@ -912,22 +926,6 @@ endif()
################################################################################
# Log4cpp - http://log4cpp.sourceforge.net/
################################################################################
find_package(LOG4CPP)
set_package_properties(LOG4CPP PROPERTIES
URL "http://log4cpp.sourceforge.net/"
DESCRIPTION "Library of C++ classes for flexible logging to files"
PURPOSE "Required by GNU Radio."
TYPE REQUIRED
)
if(NOT LOG4CPP_FOUND)
message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr")
endif()
################################################################################
# volk_gnsssdr module - GNSS-SDR's own VOLK library
################################################################################

View File

@ -39,6 +39,20 @@ find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
$ENV{LOG4CPP_ROOT}/include
)
if(LOG4CPP_INCLUDE_DIR)
file(STRINGS ${LOG4CPP_INCLUDE_DIR}/log4cpp/Priority.hh _log4cpp_Priority)
set(_log4cpp_cxx17 TRUE)
foreach(_loop_var IN LISTS _log4cpp_Priority)
string(STRIP "${_loop_var}" _file_line)
if("throw(std::invalid_argument);" STREQUAL "${_file_line}")
set(_log4cpp_cxx17 FALSE)
endif()
endforeach()
if(${_log4cpp_cxx17})
set(LOG4CPP_READY_FOR_CXX17 TRUE)
endif()
endif()
set(LOG4CPP_NAMES log4cpp)
find_library(LOG4CPP_LIBRARY
NAMES ${LOG4CPP_NAMES}

View File

@ -30,6 +30,9 @@ add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
if(${FILESYSTEM_FOUND})
target_compile_definitions(pvt_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(pvt_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(pvt_gr_blocks PRIVATE std::filesystem)
else()
target_link_libraries(pvt_gr_blocks PRIVATE Boost::filesystem Boost::system)

View File

@ -83,10 +83,15 @@
#include <sys/msg.h> // for msgctl
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
namespace fs = std::filesystem;
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/path.hpp>
#include <boost/system/error_code.hpp> // for error_code

View File

@ -63,6 +63,9 @@ add_library(pvt_libs ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
if(${FILESYSTEM_FOUND})
target_compile_definitions(pvt_libs PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(pvt_libs PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(pvt_libs PRIVATE std::filesystem)
else()
target_link_libraries(pvt_libs PRIVATE Boost::filesystem Boost::system)

View File

@ -33,15 +33,6 @@
#include "geojson_printer.h"
#include "pvt_solution.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#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
#endif
#include <glog/logging.h>
#include <cstdio> // for remove
#include <ctime> // for tm
@ -51,9 +42,20 @@
#include <sstream> // for stringstream
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -33,15 +33,6 @@
#include "gpx_printer.h"
#include "rtklib_solver.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#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
#endif
#include <glog/logging.h>
#include <cstdio> // for remove
#include <ctime> // for tm
@ -51,9 +42,20 @@
#include <sstream> // for stringstream
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -33,15 +33,6 @@
#include "kml_printer.h"
#include "rtklib_solver.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#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
#endif
#include <glog/logging.h>
#include <cstdio> // for remove
#include <cstdlib> // for mkstemp
@ -55,9 +46,20 @@
#include <sys/types.h> //for mode_t
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -36,15 +36,6 @@
#include "nmea_printer.h"
#include "rtklib_solution.h"
#include "rtklib_solver.h"
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#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
#endif
#include <glog/logging.h>
#include <cstdint>
#include <exception>
@ -53,9 +44,20 @@
#include <termios.h>
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -53,15 +53,6 @@
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/time_zone_base.hpp>
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#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
#endif
#include <glog/logging.h>
#include <algorithm> // for min and max
#include <cmath> // for floor
@ -76,9 +67,20 @@
#include <vector>
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -39,16 +39,6 @@
#include "gps_cnav_ephemeris.h"
#include "gps_ephemeris.h"
#include "rtcm.h"
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#else
#include <boost/date_time/posix_time/posix_time.hpp>
#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_codes
#endif
#include <glog/logging.h>
#include <cstdio> // for remove
#include <ctime> // for tm
@ -59,9 +49,20 @@
#include <unistd.h> // for close, write
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -68,6 +68,9 @@ add_library(acquisition_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADE
if(${FILESYSTEM_FOUND})
target_compile_definitions(acquisition_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(acquisition_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(acquisition_gr_blocks PRIVATE std::filesystem)
else()
target_link_libraries(acquisition_gr_blocks PRIVATE Boost::filesystem)

View File

@ -40,7 +40,11 @@
#include "gnss_sdr_create_directory.h"
#include "gnss_synchro.h"
#if HAS_STD_FILESYSTEM
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
#include <experimental/filesystem>
#else
#include <filesystem>
#endif
#else
#include <boost/filesystem/path.hpp>
#endif
@ -58,7 +62,11 @@
#include <map>
#if HAS_STD_FILESYSTEM
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
namespace fs = std::experimental::filesystem;
#else
namespace fs = std::filesystem;
#endif
#else
namespace fs = boost::filesystem;
#endif

View File

@ -35,7 +35,11 @@
#include "gnss_sdr_create_directory.h"
#include "gps_sdr_signal_processing.h"
#if HAS_STD_FILESYSTEM
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
#include <experimental/filesystem>
#else
#include <filesystem>
#endif
#else
#include <boost/filesystem/path.hpp>
#endif
@ -48,7 +52,11 @@
#include <sstream>
#if HAS_STD_FILESYSTEM
#if HAS_STD_FILESYSTEM_EXPERIMENTAL
namespace fs = std::experimental::filesystem;
#else
namespace fs = std::filesystem;
#endif
#else
namespace fs = boost::filesystem;
#endif

View File

@ -90,6 +90,9 @@ add_library(algorithms_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS})
if(${FILESYSTEM_FOUND})
target_compile_definitions(algorithms_libs PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(algorithms_libs PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(algorithms_libs PRIVATE std::filesystem)
else()
target_link_libraries(algorithms_libs PRIVATE Boost::filesystem Boost::system)
@ -141,6 +144,9 @@ add_library(gnss_sdr_flags gnss_sdr_flags.cc gnss_sdr_flags.h)
if(${FILESYSTEM_FOUND})
target_compile_definitions(gnss_sdr_flags PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
add_definitions(-DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(gnss_sdr_flags PRIVATE std::filesystem)
else()
target_link_libraries(gnss_sdr_flags PRIVATE Boost::filesystem)

View File

@ -29,22 +29,24 @@
*/
#include "gnss_sdr_create_directory.h"
#include <exception> // for exception
#include <fstream> // for ofstream
#if HAS_STD_FILESYSTEM
#include <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
#endif
#include <exception> // for exception
#include <fstream> // for ofstream
#if HAS_STD_FILESYSTEM
namespace fs = std::filesystem;
namespace errorlib = std;
#else
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif

View File

@ -30,18 +30,20 @@
#include "gnss_sdr_flags.h"
#if HAS_STD_FILESYSTEM
#include <filesystem>
#else
#include <boost/filesystem/operations.hpp> // for exists
#endif
#include <cstdint>
#include <iostream>
#include <string>
#if HAS_STD_FILESYSTEM
namespace fs = std::filesystem;
#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 exists
namespace fs = boost::filesystem;
#endif

View File

@ -30,6 +30,9 @@ add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ${OBS_GR_BLOCKS_HEADERS})
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)

View File

@ -46,13 +46,19 @@
#include <utility> // for move
#if HAS_STD_FILESYSTEM
#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/path.hpp>
namespace fs = boost::filesystem;
#endif
hybrid_observables_gs_sptr hybrid_observables_gs_make(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename)
{
return hybrid_observables_gs_sptr(new hybrid_observables_gs(nchannels_in, nchannels_out, dump, dump_mat, std::move(dump_filename)));

View File

@ -78,6 +78,9 @@ add_library(tracking_gr_blocks
if(${FILESYSTEM_FOUND})
target_compile_definitions(tracking_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(tracking_gr_blocks PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(tracking_gr_blocks PRIVATE std::filesystem)
else()
target_link_libraries(tracking_gr_blocks PRIVATE Boost::filesystem)

View File

@ -67,8 +67,13 @@
#include <map>
#if HAS_STD_FILESYSTEM
#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/path.hpp>
namespace fs = boost::filesystem;

View File

@ -60,8 +60,13 @@
#include <map>
#if HAS_STD_FILESYSTEM
#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/path.hpp>
namespace fs = boost::filesystem;

View File

@ -21,6 +21,9 @@ add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
if(${FILESYSTEM_FOUND})
target_compile_definitions(gnss-sdr PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(gnss-sdr PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(gnss-sdr PRIVATE std::filesystem)
else()
target_link_libraries(gnss-sdr PRIVATE Boost::filesystem Boost::system)

View File

@ -46,21 +46,13 @@
#include <boost/exception/diagnostic_information.hpp> // for diagnostic_informatio
#include <boost/exception/exception.hpp> // for exception
#include <boost/thread/exceptions.hpp> // for thread_resource_error
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
#else
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/system/error_code.hpp> // for error_code
#endif
#include <gflags/gflags.h> // for ShutDownCommandLineFlags
#include <glog/logging.h> // for FLAGS_log_dir
#include <chrono> // for time_point
#include <exception> // for exception
#include <iostream> // for operator<<, endl
#include <memory> // for unique_ptr
#include <string> // for string
#include <gflags/gflags.h> // for ShutDownCommandLineFlags
#include <glog/logging.h> // for FLAGS_log_dir
#include <chrono> // for time_point
#include <exception> // for exception
#include <iostream> // for operator<<, endl
#include <memory> // for unique_ptr
#include <string> // for string
#if CUDA_GPU_ACCEL
// For the CUDA runtime routines (prefixed with "cuda_")
@ -68,9 +60,20 @@
#endif
#if HAS_STD_FILESYSTEM
namespace fs = 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

View File

@ -356,6 +356,9 @@ if(ENABLE_UNIT_TESTING)
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
if(${FILESYSTEM_FOUND})
target_compile_definitions(run_tests PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(run_tests PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(run_tests PRIVATE std::filesystem)
else()
target_link_libraries(run_tests PRIVATE Boost::filesystem Boost::system)
@ -447,6 +450,9 @@ if(ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE std::filesystem)
else()
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE Boost::filesystem Boost::system)
@ -492,6 +498,9 @@ function(add_system_test executable)
add_executable(${executable} ${SYSTEM_TEST_SOURCES})
if(${FILESYSTEM_FOUND})
target_compile_definitions(${executable} PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(${executable} PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(${executable} PRIVATE std::filesystem)
else()
target_link_libraries(${executable} PRIVATE Boost::filesystem Boost::system)
@ -585,6 +594,9 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(flowgraph_test PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(flowgraph_test PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(flowgraph_test PRIVATE std::filesystem)
else()
target_link_libraries(flowgraph_test PRIVATE Boost::filesystem Boost::system)
@ -634,6 +646,9 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(gnss_block_test PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(gnss_block_test PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(gnss_block_test PRIVATE std::filesystem)
else()
target_link_libraries(gnss_block_test PRIVATE Boost::filesystem Boost::system)
@ -681,6 +696,9 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(gnuradio_block_test PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(gnuradio_block_test PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(gnuradio_block_test PRIVATE std::filesystem)
else()
target_link_libraries(gnuradio_block_test PRIVATE Boost::filesystem Boost::system)
@ -784,6 +802,9 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(trk_test PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(trk_test PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(trk_test PRIVATE std::filesystem)
else()
target_link_libraries(trk_test PRIVATE Boost::filesystem Boost::system)
@ -825,6 +846,9 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
)
if(${FILESYSTEM_FOUND})
target_compile_definitions(control_thread_test PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(control_thread_test PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(control_thread_test PRIVATE std::filesystem)
else()
target_link_libraries(control_thread_test PRIVATE Boost::filesystem Boost::system)

View File

@ -38,8 +38,13 @@
#include <random>
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -55,17 +55,23 @@
#include <utility>
#if HAS_STD_FILESYSTEM
#include <filesystem>
#include <system_error>
namespace fs = std::filesystem;
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.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/error_code.hpp> // for error_code
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
DEFINE_string(config_file_ptest, std::string(""), "File containing alternative configuration parameters for the acquisition performance test.");
DEFINE_string(acq_test_input_file, std::string(""), "File containing raw signal data, must be in int8_t format. The signal generator will not be used.");
DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test. Alternatives: GPS_L1_CA_PCPS_Acquisition, GPS_L1_CA_PCPS_Acquisition_Fine_Doppler, Galileo_E1_PCPS_Ambiguous_Acquisition, GLONASS_L1_CA_PCPS_Acquisition, GLONASS_L2_CA_PCPS_Acquisition, GPS_L2_M_PCPS_Acquisition, Galileo_E5a_Pcps_Acquisition, GPS_L5i_PCPS_Acquisition");

View File

@ -59,8 +59,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -59,8 +59,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -60,13 +60,19 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;
#endif
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
class GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx;

View File

@ -59,8 +59,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -60,8 +60,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -61,8 +61,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -60,8 +60,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -76,8 +76,13 @@
#endif
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;

View File

@ -47,7 +47,6 @@
#include "tracking_tests_flags.h"
#include "tracking_true_obs_reader.h"
#include <armadillo>
#include <boost/filesystem.hpp>
#include <gnuradio/blocks/file_source.h>
#include <gnuradio/blocks/head.h>
#include <gnuradio/blocks/interleaved_char_to_complex.h>
@ -60,6 +59,19 @@
#include <utility>
#include <vector>
#if HAS_STD_FILESYSTEM
#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.hpp>
namespace fs = boost::filesystem;
#endif
// threads
#include <fcntl.h> // for open, O_RDWR, O_SYNC
#include <iostream> // for cout, endl
@ -1131,8 +1143,8 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
{
try
{
boost::filesystem::path p(gnuplot_executable);
boost::filesystem::path dir = p.parent_path();
fs::path p(gnuplot_executable);
fs::path dir = p.parent_path();
const std::string& gnuplot_path = dir.native();
Gnuplot::set_GNUPlotPath(gnuplot_path);
auto decimate = static_cast<unsigned int>(FLAGS_plot_decimate);

View File

@ -58,6 +58,9 @@ add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
if(${FILESYSTEM_FOUND})
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM=1)
if(${find_experimental})
target_compile_definitions(front-end-cal PRIVATE -DHAS_STD_FILESYSTEM_EXPERIMENTAL=1)
endif()
target_link_libraries(front-end-cal PRIVATE std::filesystem)
else()
target_link_libraries(front-end-cal PRIVATE Boost::filesystem Boost::system)