From 6c976ea67b29ad7a6ae7d469581c7c60cdcdf28b Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 21 Aug 2019 17:22:43 +0000 Subject: [PATCH] test: don't use on macOS. Xcode 11 requires at least macOS 10.15 (upcoming) in order to use either or C++17 . Signed-off-by: Piotr Sikora --- test/test_common/environment.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_common/environment.cc b/test/test_common/environment.cc index 86b0a0ec3bdd..d0f0577f4763 100644 --- a/test/test_common/environment.cc +++ b/test/test_common/environment.cc @@ -8,7 +8,7 @@ #if defined(_LIBCPP_VERSION) && !defined(__APPLE__) #include #elif defined __has_include -#if __has_include() +#if __has_include() && !defined(__APPLE__) #include #endif #endif @@ -44,7 +44,7 @@ std::string makeTempDir(char* name_template) { name_template, strerror(errno))); #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 9000 && !defined(__APPLE__) std::__fs::filesystem::create_directories(dirname); -#elif defined __cpp_lib_experimental_filesystem +#elif defined __cpp_lib_experimental_filesystem && !defined(__APPLE__) std::experimental::filesystem::create_directories(dirname); #endif #else @@ -102,7 +102,7 @@ void TestEnvironment::createParentPath(const std::string& path) { // We don't want to rely on mkdir etc. if we can avoid it, since it might not // exist in some environments such as ClusterFuzz. std::__fs::filesystem::create_directories(std::__fs::filesystem::path(path).parent_path()); -#elif defined __cpp_lib_experimental_filesystem +#elif defined __cpp_lib_experimental_filesystem && !defined(__APPLE__) std::experimental::filesystem::create_directories( std::experimental::filesystem::path(path).parent_path()); #else @@ -120,7 +120,7 @@ void TestEnvironment::removePath(const std::string& path) { return; } std::__fs::filesystem::remove_all(std::__fs::filesystem::path(path)); -#elif defined __cpp_lib_experimental_filesystem +#elif defined __cpp_lib_experimental_filesystem && !defined(__APPLE__) if (!std::experimental::filesystem::exists(path)) { return; }