Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support clang and std::filesystem #390

Merged
merged 2 commits into from
Mar 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/test_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
#endif

#ifndef __APPLE__
#if __unix__ && __GNUC__ < 8
#if ((defined(__clang__) && __cplusplus < 201703L) || \
(__unix__ && __GNUC__ < 8))
#define GZ_EXPERIMENTAL_FILESYSTEM
#endif

#ifdef GZ_EXPERIMENTAL_FILESYSTEM
#include <experimental/filesystem>
#else
#include <filesystem>
Expand Down Expand Up @@ -98,7 +103,7 @@ namespace testing
// Ugly as hell but trying to avoid boost::filesystem
return _str1 + "/" + _str2;
#else
#if __unix__ && __GNUC__ < 8
#ifdef GZ_EXPERIMENTAL_FILESYSTEM
using namespace std::experimental::filesystem;
#else
using namespace std::filesystem;
Expand Down