-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate unused ghc_filesystem external.
- Loading branch information
1 parent
8dff9ef
commit 3eab23d
Showing
5 changed files
with
8 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,17 @@ | ||
#pragma once | ||
|
||
// Alias drake::filesystem to either std::filesystem or ghc::filesystem. | ||
// Alias drake::filesystem to std::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. Similarly, GCC prior to 9 requires arcane linker | ||
// flags, so we need to exclude it as well. | ||
// | ||
// Keep this if-sequence in sync with drake/common/filesystem.cc. | ||
#if __has_include(<filesystem>) && !( \ | ||
defined(__APPLE__) || \ | ||
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 9))) | ||
|
||
#include <filesystem> | ||
namespace drake { namespace filesystem = std::filesystem; } | ||
|
||
#else | ||
namespace drake { | ||
|
||
#define GHC_FILESYSTEM_FWD | ||
#include "ghc/filesystem.hpp" | ||
#undef GHC_FILESYSTEM_FWD | ||
namespace drake { namespace filesystem = ghc::filesystem; } | ||
// For legacy reasons, we have an Anzu alias for std::filesystem. | ||
// In the future, we could port to `std` directly and remove this alias. | ||
namespace filesystem = std::filesystem; | ||
|
||
#endif | ||
} // namespace drake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters