1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

ghc::filesystem devendor to submodule

Also removed some unused/old options for conditionally not using
ghc::filesystem and a sodium option that wasn't used anywhere.
This commit is contained in:
Jason Rhinelander 2020-02-13 15:39:34 -04:00
parent 3df4eaef2d
commit c522bc0537
5 changed files with 7 additions and 16 deletions

3
.gitmodules vendored
View file

@ -10,3 +10,6 @@
[submodule "external/cxxopts"]
path = external/cxxopts
url = https://github.com/jarro2783/cxxopts.git
[submodule "external/ghc-filesystem"]
path = external/ghc-filesystem
url = https://github.com/gulrak/filesystem.git

View file

@ -27,8 +27,6 @@ option(WITH_COVERAGE "generate coverage data" OFF)
option(USE_SHELLHOOKS "enable shell hooks on compile time (dangerous)" OFF)
option(WARNINGS_AS_ERRORS "treat all warnings as errors. turn off for development, on for release" OFF)
option(TRACY_ROOT "include tracy profiler source" OFF)
option(VENDOR_LIBSODIUM "use vendored libsodium" OFF)
option(VENDOR_FILESYSTEM "use vendored fs::filesystem" ON)
option(WITH_TESTS "build unit tests" ON)
option(WITH_SYSTEMD "enable systemd integration for sd_notify" OFF)
@ -255,15 +253,10 @@ if(SUBMODULE_CHECK)
check_submodule(external/nlohmann)
check_submodule(external/googletest)
check_submodule(external/cxxopts)
check_submodule(external/ghc-filesystem)
endif()
endif()
if(VENDOR_FILESYSTEM)
include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/ghc-filesystem/include")
add_definitions(-DLOKINET_USE_GHC_FILESYSTEM)
message(STATUS "Using vendored ghc::filesystem")
endif()
if(WITH_TESTS)
add_subdirectory(external/googletest EXCLUDE_FROM_ALL)
endif()
@ -272,6 +265,7 @@ add_subdirectory(external/abseil-cpp EXCLUDE_FROM_ALL)
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(external/nlohmann EXCLUDE_FROM_ALL)
add_subdirectory(external/cxxopts)
add_subdirectory(external/ghc-filesystem)
if(ANDROID)
list(APPEND LIBS log)

1
external/ghc-filesystem vendored Submodule

@ -0,0 +1 @@
Subproject commit c428aba39d5829c4bac420edd2319f8c993f203a

View file

@ -72,6 +72,7 @@ target_link_libraries(${UTIL_LIB} PUBLIC ${CRYPTOGRAPHY_LIB} ${LOG_LIB} ${CURL_L
target_link_libraries(${UTIL_LIB} PUBLIC
absl::synchronization absl::flat_hash_map absl::container
nlohmann_json::nlohmann_json
ghc_filesystem
)
# cut back on fluff

View file

@ -9,16 +9,8 @@
#define PATH_SEP "/"
#endif
#if defined(LOKINET_USE_GHC_FILESYSTEM)
#include <ghc/filesystem.hpp>
namespace fs = ghc::filesystem;
#elif __cplusplus >= 201703L && !defined(_MSC_VER)
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif
#ifndef _MSC_VER
#include <dirent.h>