aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/pch.h4
-rw-r--r--toolsrc/include/vcpkg/base/files.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h
index ce2a7c9c5..a6a442f0a 100644
--- a/toolsrc/include/pch.h
+++ b/toolsrc/include/pch.h
@@ -31,7 +31,11 @@
#include <cstdint>
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <cstring>
+#if USE_STD_FILESYSTEM
+#include <filesystem>
+#else
#include <experimental/filesystem>
+#endif
#include <fstream>
#include <functional>
#include <iomanip>
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index e9d3d33bf..bb4a10d49 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -2,12 +2,20 @@
#include <vcpkg/base/expected.h>
+#if USE_STD_FILESYSTEM
+#include <filesystem>
+#else
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>
+#endif
namespace fs
{
+#if USE_STD_FILESYSTEM
+ namespace stdfs = std::filesystem;
+#else
namespace stdfs = std::experimental::filesystem;
+#endif
using stdfs::copy_options;
using stdfs::path;