diff --git a/CMakeLists.txt b/CMakeLists.txt index c4406780f..c9ae4c210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -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 diff --git a/src/b17sort_manager.hpp b/src/b17sort_manager.hpp index 0c46efbb0..3f0f2d8c3 100644 --- a/src/b17sort_manager.hpp +++ b/src/b17sort_manager.hpp @@ -20,8 +20,7 @@ #include #include #include - -#include "chia_filesystem.hpp" +#include #include "./bits.hpp" #include "./calculate_bucket.hpp" @@ -30,6 +29,8 @@ #include "./uniformsort.hpp" #include "exceptions.hpp" +namespace fs = std::filesystem; + class b17SortManager { public: b17SortManager( diff --git a/src/chia_filesystem.hpp b/src/chia_filesystem.hpp deleted file mode 100644 index ab3f98060..000000000 --- a/src/chia_filesystem.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2020 Chia Network Inc - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef SRC_CPP_CHIA_FILESYSTEM_HPP_ -#define SRC_CPP_CHIA_FILESYSTEM_HPP_ - -#ifdef __APPLE__ -// std::filesystem is not supported on Mojave -#include "filesystem.hpp" -namespace fs = ghc::filesystem; -#else -#ifdef __has_include -#if __has_include() -#include -namespace fs = std::filesystem; -#else -#include -namespace fs = std::experimental::filesystem; -#endif -#else -#include -namespace fs = std::filesystem; -#endif -#endif - -#endif // SRC_CPP_CHIA_FILESYSTEM_HPP_ diff --git a/src/disk.hpp b/src/disk.hpp index f1a8df508..72fcd0364 100644 --- a/src/disk.hpp +++ b/src/disk.hpp @@ -22,14 +22,13 @@ #include #include #include - +#include // 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" diff --git a/src/phase1.hpp b/src/phase1.hpp index 600b486dd..b8f3bad68 100644 --- a/src/phase1.hpp +++ b/src/phase1.hpp @@ -35,8 +35,7 @@ #include #include #include - -#include "chia_filesystem.hpp" +#include #include "calculate_bucket.hpp" #include "entry_sizes.hpp" @@ -47,6 +46,8 @@ #include "util.hpp" #include "progress.hpp" +namespace fs = std::filesystem; + struct THREADDATA { int index; Sem::type* mine; diff --git a/src/plotter_disk.hpp b/src/plotter_disk.hpp index 77ab51d25..f62fd1155 100644 --- a/src/plotter_disk.hpp +++ b/src/plotter_disk.hpp @@ -32,8 +32,7 @@ #include #include #include - -#include "chia_filesystem.hpp" +#include #include "calculate_bucket.hpp" #include "encoding.hpp" @@ -51,6 +50,7 @@ #include "util.hpp" #define B17PHASE23 +namespace fs = std::filesystem; class DiskPlotter { public: diff --git a/src/sort_manager.hpp b/src/sort_manager.hpp index 0c5535bf7..a605db39a 100644 --- a/src/sort_manager.hpp +++ b/src/sort_manager.hpp @@ -20,8 +20,7 @@ #include #include #include - -#include "chia_filesystem.hpp" +#include #include "./bits.hpp" #include "./calculate_bucket.hpp" @@ -31,6 +30,8 @@ #include "disk.hpp" #include "exceptions.hpp" +namespace fs = std::filesystem; + enum class strategy_t : uint8_t { uniform,