Skip to content

Commit

Permalink
Just use std::filesystem (#450)
Browse files Browse the repository at this point in the history
We require C++17 where `std::filesystem` is standard and we don't
support some of the older systems (like Mojave) anymore where we need to
use some other things like `gulrak` or `experimental`
  • Loading branch information
emlowe authored Oct 30, 2024
2 parents 136616d + 5554f8e commit 779886e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 56 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ if (${CP_BUILD_BLADEBIT_HARVESTER})
FetchContent_MakeAvailable(bladebit)
endif()

FetchContent_Declare(
gulrak
GIT_REPOSITORY https://github.com/gulrak/filesystem.git
GIT_TAG v1.5.14
)
FetchContent_MakeAvailable(gulrak)

set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib)
set(FSE_FILES
${FSE_LIB}/fse_compress.c
Expand All @@ -72,7 +65,6 @@ include_directories(
${INCLUDE_DIRECTORIES}
${CMAKE_CURRENT_SOURCE_DIR}/../lib/include
${cxxopts_SOURCE_DIR}/include
${gulrak_SOURCE_DIR}/include/ghc
${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/test
Expand Down
5 changes: 3 additions & 2 deletions src/b17sort_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <iostream>
#include <string>
#include <vector>

#include "chia_filesystem.hpp"
#include <filesystem>

#include "./bits.hpp"
#include "./calculate_bucket.hpp"
Expand All @@ -30,6 +29,8 @@
#include "./uniformsort.hpp"
#include "exceptions.hpp"

namespace fs = std::filesystem;

class b17SortManager {
public:
b17SortManager(
Expand Down
37 changes: 0 additions & 37 deletions src/chia_filesystem.hpp

This file was deleted.

5 changes: 2 additions & 3 deletions src/disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@
#include <vector>
#include <thread>
#include <chrono>

#include <filesystem>
// enables disk I/O logging to disk.log
// use tools/disk.gnuplot to generate a plot
#define ENABLE_LOGGING 0

using namespace std::chrono_literals; // for operator""min;

#include "chia_filesystem.hpp"
namespace fs = std::filesystem;

#include "./bits.hpp"
#include "./util.hpp"
Expand Down
5 changes: 3 additions & 2 deletions src/phase1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
#include <thread>
#include <memory>
#include <mutex>

#include "chia_filesystem.hpp"
#include <filesystem>

#include "calculate_bucket.hpp"
#include "entry_sizes.hpp"
Expand All @@ -47,6 +46,8 @@
#include "util.hpp"
#include "progress.hpp"

namespace fs = std::filesystem;

struct THREADDATA {
int index;
Sem::type* mine;
Expand Down
4 changes: 2 additions & 2 deletions src/plotter_disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
#include <string>
#include <vector>
#include <memory>

#include "chia_filesystem.hpp"
#include <filesystem>

#include "calculate_bucket.hpp"
#include "encoding.hpp"
Expand All @@ -51,6 +50,7 @@
#include "util.hpp"

#define B17PHASE23
namespace fs = std::filesystem;

class DiskPlotter {
public:
Expand Down
5 changes: 3 additions & 2 deletions src/sort_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <iostream>
#include <string>
#include <vector>

#include "chia_filesystem.hpp"
#include <filesystem>

#include "./bits.hpp"
#include "./calculate_bucket.hpp"
Expand All @@ -31,6 +30,8 @@
#include "disk.hpp"
#include "exceptions.hpp"

namespace fs = std::filesystem;

enum class strategy_t : uint8_t
{
uniform,
Expand Down

0 comments on commit 779886e

Please sign in to comment.