From 937747323dd88e63e48a276391d2664cb0ecba67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 29 May 2020 14:31:37 +0200 Subject: [PATCH] Ensure clang uses the normal standard headers. Clang defines __GNUC__ to 4, as that represents its level of support for the GNU C dialect. The gcc compiler does not provide a macro indicating the compiler separately from the dialect supported. We must therefore use the __clang__ macro to avoid false positives. --- opm/common/utility/FileSystem.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/common/utility/FileSystem.hpp b/opm/common/utility/FileSystem.hpp index 861c7db50..e3f0fe344 100644 --- a/opm/common/utility/FileSystem.hpp +++ b/opm/common/utility/FileSystem.hpp @@ -20,7 +20,7 @@ #define OPM_FILESYSTEM_HPP #if __cplusplus < 201703L || \ - (defined(__GNUC__) && __GNUC__ < 8) + (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__)) #include #else #include @@ -32,7 +32,7 @@ namespace Opm { #if __cplusplus < 201703L || \ - (defined(__GNUC__) && __GNUC__ < 8) + (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__)) namespace filesystem = std::experimental::filesystem; #else namespace filesystem = std::filesystem;