ceph/cmake/modules/FindStdFilesystem_test.cc
Willem Jan Withagen 1d58db8c9b cmake: Make the tests for finding Filesystem with more serious functions
Otherwise it is linked agains lc++ on FreeBSD,a dn that will satisfy both
tested libraries.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-02-14 13:18:50 +01:00

15 lines
349 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() {
fs::create_directory("sandbox");
fs::remove_all("sandbox");
}