mirror of
https://github.com/ceph/ceph
synced 2024-12-27 22:13:28 +00:00
e6c7e0f521
see https://libcxx.llvm.org/docs/UsingLibcxx.html#using-libc-experimental-and-experimental, > Note that as of libc++ 7.0 using the <experimental/filesystem> > requires linking libc++fs instead of libc++experimental. do not build ceph_test_admin_socket_output if we are not able to find the library for std::experimental::filesystem . it is a workaround of https://reviews.freebsd.org/D10840 where FreeBSD 11.2 does not ship libc++experimental.a . Signed-off-by: Kefu Chai <kchai@redhat.com>
14 lines
320 B
C++
14 lines
320 B
C++
#if __has_include(<filesystem>)
|
|
#include <filesystem>
|
|
namespace fs = std::filesystem;
|
|
#elif __has_include(<experimental/filesystem>)
|
|
#include <experimental/filesystem>
|
|
namespace fs = std::experimental::filesystem;
|
|
#else
|
|
#error std::filesystem not available!
|
|
#endif
|
|
|
|
int main() {
|
|
[[maybe_unused]] fs::path path("/");
|
|
}
|