forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filesystem.h
29 lines (24 loc) · 898 Bytes
/
filesystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
// Alias drake::filesystem to either std::filesystem or ghc::filesystem.
//
// The drake::filesystem support is intended ONLY for use within Drake's *.cc
// files -- it is not a public dependency of Drake; do not include this file
// from Drake header files.
//
// Note that until apple ships a working std::filesystem implementation, we
// need to force-disable it.
//
// Keep this if-sequence in sync with drake/common/filesystem.cc.
#if __has_include(<filesystem>) && !defined(__APPLE__)
#include <filesystem>
namespace drake { namespace filesystem = std::filesystem; }
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#define GHC_FILESYSTEM_FWD
#include "ghc/filesystem.hpp"
#undef GHC_FILESYSTEM_FWD
#pragma GCC diagnostic pop
namespace drake { namespace filesystem = ghc::filesystem; }
#endif