Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 4.0)

project(cpp_dependencies LANGUAGES CXX)

Expand Down Expand Up @@ -45,7 +45,7 @@ elseif(WIN32)
endif()
set(CPACK_GENERATOR "${DEFAULT_CPACK_GENERATOR}" CACHE STRING "Package type to generate with CPack")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

if("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU)
Expand Down
25 changes: 18 additions & 7 deletions src/FilesystemInclude.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@

#ifdef WITH_BOOST

#include <boost/filesystem.hpp>

namespace filesystem = boost::filesystem;
#include <boost/filesystem.hpp>
namespace filesystem = boost::filesystem;

#else

#include <experimental/filesystem>

namespace filesystem = std::experimental::filesystem;
# if __cplusplus >= 201703L
#include <filesystem>
namespace filesystem = std::filesystem;

// Code specific to C++17 or later
#define HAS_CPP17_FEATURES
# elif __cplusplus >= 201103L
#include <experimental/filesystem>
namespace filesystem = std::experimental::filesystem;

// Code specific to C++11 or later (but not C++17)
#define HAS_CPP11_FEATURES
# else
// Code for older C++ versions (e.g., C++98/03)
#pragma error("C++ version is too old, please use C++11 or later.")
# endif

#endif

Expand Down