From a5b83e2e097700f45132b54bcf074ab8ed7d5ea1 Mon Sep 17 00:00:00 2001 From: tsjost Date: Tue, 12 Oct 2021 15:40:34 +0200 Subject: [PATCH] Remove Boost Filesystem stuff --- CMakeLists.txt | 3 --- cmake_configure.cmake | 5 ----- cmake_options.cmake | 4 ++-- rwcore/rw/filesystem.hpp | 28 ---------------------------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe511187..b96a3b4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,9 +29,6 @@ if(USE_CONAN) else() find_package(Boost REQUIRED) find_package(Boost COMPONENTS program_options system REQUIRED) - if(FILESYSTEM_LIBRARY STREQUAL "BOOST") - find_package(Boost COMPONENTS filesystem system REQUIRED) - endif() if(BUILD_TESTS) find_package(Boost COMPONENTS unit_test_framework REQUIRED) endif() diff --git a/cmake_configure.cmake b/cmake_configure.cmake index 33123c64..a7b683b3 100644 --- a/cmake_configure.cmake +++ b/cmake_configure.cmake @@ -126,11 +126,6 @@ elseif(FILESYSTEM_LIBRARY STREQUAL "CXXTS") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_link_libraries(rw_interface INTERFACE "stdc++fs") endif() -elseif(FILESYSTEM_LIBRARY STREQUAL "BOOST") - target_compile_definitions(rw_interface INTERFACE "RW_FS_LIBRARY=2") - target_link_libraries(rw_interface INTERFACE - Boost::filesystem - ) else() message(FATAL_ERROR "Illegal FILESYSTEM_LIBRARY option. (was '${FILESYSTEM_LIBRARY}')") endif() diff --git a/cmake_options.cmake b/cmake_options.cmake index d0d10cb0..7ff53ac2 100644 --- a/cmake_options.cmake +++ b/cmake_options.cmake @@ -12,8 +12,8 @@ option(TEST_DATA "Enable tests that require game data") set(FAILED_CHECK_ACTION "IGNORE" CACHE STRING "What action to perform on a failed RW_CHECK (in debug mode)") set_property(CACHE FAILED_CHECK_ACTION PROPERTY STRINGS "IGNORE" "ABORT" "BREAKPOINT") -set(FILESYSTEM_LIBRARY "BOOST" CACHE STRING "Which filesystem library to use") -set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS" "BOOST") +set(FILESYSTEM_LIBRARY "CXX17" CACHE STRING "Which filesystem library to use") +set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS") set(CMAKE_CONFIGURATION_TYPES "Release;Debug;RelWithDebInfo;MinSizeRel" CACHE INTERNAL "Build types supported by this project.") if(NOT CMAKE_BUILD_TYPE) diff --git a/rwcore/rw/filesystem.hpp b/rwcore/rw/filesystem.hpp index 062bff1a..b0b6ff6d 100644 --- a/rwcore/rw/filesystem.hpp +++ b/rwcore/rw/filesystem.hpp @@ -3,7 +3,6 @@ #define RW_FS_CXX17 0 #define RW_FS_CXXTS 1 -#define RW_FS_BOOST 2 #if RW_FS_LIBRARY == RW_FS_CXX17 #include @@ -19,33 +18,6 @@ namespace rwfs { using namespace std::experimental::filesystem; using error_code = std::error_code; } -#elif RW_FS_LIBRARY == RW_FS_BOOST -#include -#include -#include -namespace rwfs { - using namespace boost::filesystem; - using error_code = boost::system::error_code; -} -#include -#if BOOST_VERSION < 105600 -namespace boost { -namespace filesystem { -inline const directory_iterator& begin(const directory_iterator& iter) { - return iter; -} -inline directory_iterator end(const directory_iterator&) { - return {}; -} -inline const recursive_directory_iterator& begin(const recursive_directory_iterator& iter) { - return iter; -} -inline recursive_directory_iterator end(const recursive_directory_iterator&) { - return {}; -} -} -} -#endif #else #error Invalid RW_FS_LIBRARY value #endif