From 46979c2197507c9af703e65a6352b8c510a234d1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 12 Jun 2019 20:52:40 +0200 Subject: [PATCH] Fix test when std::filesystem is available --- .../tracking/tracking_pull-in_test_fpga.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc index a2546b400..aee343587 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc @@ -47,7 +47,6 @@ #include "tracking_tests_flags.h" #include "tracking_true_obs_reader.h" #include -#include #include #include #include @@ -60,6 +59,14 @@ #include #include +#if HAS_STD_FILESYSTEM +#include +namespace fs = std::filesystem; +#else +#include +namespace fs = boost::filesystem; +#endif + // threads #include // for open, O_RDWR, O_SYNC #include // for cout, endl @@ -1131,8 +1138,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(FLAGS_plot_decimate);