From 1e8da2077919469ccc7e6dd4673af2bdc256469d Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Sat, 24 Apr 2021 16:45:28 +0200
Subject: [PATCH] std to boost filesystem

---
 conanfile.txt                           |  5 ++++-
 corsika/detail/output/BaseOutput.inl    |  4 ++--
 corsika/detail/output/OutputManager.inl | 10 +++++-----
 corsika/output/BaseOutput.hpp           |  5 ++---
 corsika/output/OutputManager.hpp        |  8 ++++----
 examples/cascade_proton_example.cpp     |  1 -
 modules/conex                           |  2 +-
 7 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/conanfile.txt b/conanfile.txt
index 906a16ab8..4bd98bd6a 100644
--- a/conanfile.txt
+++ b/conanfile.txt
@@ -1,5 +1,6 @@
 [requires]
-spdlog/1.8.0
+readline/8.0 # this is only needed to fix a missing dependency in "bison" which is pulled-in by arrow
+spdlog/1.8.5
 catch2/2.13.3
 eigen/3.3.8
 boost/1.75.0
@@ -11,6 +12,7 @@ arrow/2.0.0
 cmake
 
 [options]
+readline:shared=True
 arrow:shared=False
 arrow:parquet=True
 arrow:fPIC=False
@@ -23,3 +25,4 @@ arrow:with_grpc=False
 arrow:with_utf8proc=False
 arrow:with_zstd=False
 arrow:with_bz2=False
+
diff --git a/corsika/detail/output/BaseOutput.inl b/corsika/detail/output/BaseOutput.inl
index 21631fea9..39710531e 100644
--- a/corsika/detail/output/BaseOutput.inl
+++ b/corsika/detail/output/BaseOutput.inl
@@ -10,6 +10,6 @@
 namespace corsika {
 
   BaseOutput::BaseOutput()
-      : shower_(0){}
+      : shower_(0) {}
 
-}
+} // namespace corsika
diff --git a/corsika/detail/output/OutputManager.inl b/corsika/detail/output/OutputManager.inl
index f7936166c..15b361507 100644
--- a/corsika/detail/output/OutputManager.inl
+++ b/corsika/detail/output/OutputManager.inl
@@ -21,7 +21,7 @@
 namespace corsika {
 
   void OutputManager::writeNode(YAML::Node const& node,
-                                std::filesystem::path const& path) const {
+                                boost::filesystem::path const& path) const {
 
     // construct a YAML emitter for this config file
     YAML::Emitter out;
@@ -92,7 +92,7 @@ namespace corsika {
     auto const path{root_ / name};
 
     // create the directory for this process.
-    std::filesystem::create_directory(path);
+    boost::filesystem::create_directory(path);
 
     // get the config for this output
     auto config = outputs_.at(name).get().getConfig();
@@ -106,12 +106,12 @@ namespace corsika {
 
   OutputManager::OutputManager(
       std::string const& name,
-      std::filesystem::path const& dir = std::filesystem::current_path())
+      boost::filesystem::path const& dir = boost::filesystem::current_path())
       : name_(name)
       , root_(dir / name) {
 
     // check if this directory already exists
-    if (std::filesystem::exists(root_)) {
+    if (boost::filesystem::exists(root_)) {
       logger->warn(
           "Output directory '{}' already exists! This is currenty not supported.",
           root_.string());
@@ -119,7 +119,7 @@ namespace corsika {
     }
 
     // construct the directory for this library
-    std::filesystem::create_directory(root_);
+    boost::filesystem::create_directory(root_);
 
     // write the top level config file
     writeTopLevelConfig();
diff --git a/corsika/output/BaseOutput.hpp b/corsika/output/BaseOutput.hpp
index a5ebc483a..023b9b884 100644
--- a/corsika/output/BaseOutput.hpp
+++ b/corsika/output/BaseOutput.hpp
@@ -7,8 +7,7 @@
  */
 #pragma once
 
-//#include <memory>
-#include <filesystem>
+#include <boost/filesystem>
 
 #include <yaml-cpp/yaml.h>
 
@@ -29,7 +28,7 @@ namespace corsika {
     /**
      * Called at the start of each run.
      */
-    virtual void startOfLibrary(std::filesystem::path const& directory) = 0;
+    virtual void startOfLibrary(boost::filesystem::path const& directory) = 0;
 
     /**
      * Called at the start of each event/shower.
diff --git a/corsika/output/OutputManager.hpp b/corsika/output/OutputManager.hpp
index 76105f2b6..aa6c52a8d 100644
--- a/corsika/output/OutputManager.hpp
+++ b/corsika/output/OutputManager.hpp
@@ -9,7 +9,7 @@
 
 #include <chrono>
 #include <string>
-#include <filesystem>
+#include <boost/filesystem.hpp>
 #include <corsika/output/BaseOutput.hpp>
 #include <corsika/framework/core/Logging.hpp>
 
@@ -32,7 +32,7 @@ namespace corsika {
 
     OutputState state_{OutputState::NoInit}; ///< The current state of this manager.
     std::string const name_;                 ///< The name of this simulation file.
-    std::filesystem::path const root_;       ///< The top-level directory for the output.
+    boost::filesystem::path const root_;       ///< The top-level directory for the output.
     int count_{0};                           ///< The current ID of this shower.
     std::chrono::time_point<std::chrono::system_clock> const start_time{
         std::chrono::system_clock::now()};           ///< The time the manager is created.
@@ -45,7 +45,7 @@ namespace corsika {
     /**
      * Write a YAML-node to a file.
      */
-    void writeNode(YAML::Node const& node, std::filesystem::path const& path) const;
+    void writeNode(YAML::Node const& node, boost::filesystem::path const& path) const;
 
     /**
      * Write the top-level config of this simulation.
@@ -69,7 +69,7 @@ namespace corsika {
      * @param name    The name of this output collection.
      * @param dir     The directory where the output directory will be stored.
      */
-    OutputManager(std::string const& name, std::filesystem::path const& dir);
+    OutputManager(std::string const& name, boost::filesystem::path const& dir);
 
     /**
      * Handle graceful closure of the outputs upon destruction.
diff --git a/examples/cascade_proton_example.cpp b/examples/cascade_proton_example.cpp
index 7c17d97eb..4b0b25f53 100644
--- a/examples/cascade_proton_example.cpp
+++ b/examples/cascade_proton_example.cpp
@@ -23,7 +23,6 @@
 #include <corsika/media/MediumPropertyModel.hpp>
 #include <corsika/media/UniformMagneticField.hpp>
 
-
 #include <corsika/setup/SetupEnvironment.hpp>
 #include <corsika/setup/SetupStack.hpp>
 #include <corsika/setup/SetupTrajectory.hpp>
diff --git a/modules/conex b/modules/conex
index 820f042b6..332e22472 160000
--- a/modules/conex
+++ b/modules/conex
@@ -1 +1 @@
-Subproject commit 820f042b6a055276d465437c74160ef7c199b646
+Subproject commit 332e22472595377694e16163c76507f4c722556f
-- 
GitLab