summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-02-16 08:53:42 +0100
committerMartin Michlmayr <tbm@cyrius.com>2023-02-20 12:22:23 +0800
commit09d7d17dd9a722632e885ac72b63053ca196c85b (patch)
treed0a36c439825b1c8591529cd93baf76af64f8fe6
parent179646d1c12d93202afad0bf84490778283ec2e8 (diff)
Enforce use of non-deprecated boost::filesystem API
For details see https://www.boost.org/doc/libs/1_81_0/libs/filesystem/doc/deprecated.html
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/system.hh.in1
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 394cf3eb..96840934 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,10 @@ endif()
enable_testing()
-add_definitions(-std=c++11)
+add_definitions(
+ -std=c++11
+ -DBOOST_FILESYSTEM_NO_DEPRECATED
+)
if (CYGWIN)
add_definitions(-U__STRICT_ANSI__)
endif()
diff --git a/src/system.hh.in b/src/system.hh.in
index f473bb8b..60ea0fd8 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -148,6 +148,7 @@
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/directory.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/foreach.hpp>