Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include <filesystem> only if FMT_CPP_LIB_FILESYSTEM is set (fmtlib#4258)
This change results out of necessity since the Nintendo Switch console SDK does not support `std::filesystem`. The SDK still provides the `<filesystem>` header, but with an `#error` directive, effectively breaking any build that includes `<filesystem>` Because `<filesystem>` is present, `FMT_HAS_INCLUDE` is insufficient here. With this change and `FMT_CPP_LIB_FILESYSTEM` in place, one can define `FMT_CPP_LIB_FILESYSTEM=0` to work around this issue. This assumes that `<filesystem>` can be included (without warnings) if `FMT_CPP_LIB_FILESYSTEM` is set. If this is not the case, fmt would be broken even before this change as `std::filesystem::path` is used without the accompanying header.
- Loading branch information