Melissa Jost has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email )
Change subject: base: Use <experimental/filesystem> include for GCC v7
......................................................................
base: Use <experimental/filesystem> include for GCC v7
This change adds include guards to the inclusion of the
filesystem module to ensure GCC 7 can work properly,
addressing an issue in the compiler tests.
Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
M src/mem/shared_memory_server.cc
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/mem/shared_memory_server.cc
b/src/mem/shared_memory_server.cc
index 3e49164..f99655c 100644
--- a/src/mem/shared_memory_server.cc
+++ b/src/mem/shared_memory_server.cc
@@ -39,7 +39,18 @@
#include <algorithm>
#include <cerrno>
#include <cstring>
-#include <filesystem>
+#if (defined(GNUC) && (GNUC >= 8)) || defined(clang)
-
#include <filesystem>
+#else
-
// This is only reachable if we're using GCC 7 (note: gem5 does not
support
-
// GCC versions older than GCC 7 as they do not support the C++17
-
// standard).
-
// If we're using GCC 7, we need to use <experimental/filesystem>.
-
#include <experimental/filesystem>
-
namespace std {
-
namespace filesystem = experimental::filesystem;
-
}
+#endif
#include "base/logging.hh"
#include "base/output.hh"
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
Gerrit-Change-Number: 69840
Gerrit-PatchSet: 1
Gerrit-Owner: Melissa Jost melissakjost@gmail.com
Gerrit-MessageType: newchange
Melissa Jost has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email )
Change subject: base: Use <experimental/filesystem> include for GCC v7
......................................................................
base: Use <experimental/filesystem> include for GCC v7
This change adds include guards to the inclusion of the
filesystem module to ensure GCC 7 can work properly,
addressing an issue in the compiler tests.
Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
---
M src/mem/shared_memory_server.cc
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/mem/shared_memory_server.cc
b/src/mem/shared_memory_server.cc
index 3e49164..f99655c 100644
--- a/src/mem/shared_memory_server.cc
+++ b/src/mem/shared_memory_server.cc
@@ -39,7 +39,18 @@
#include <algorithm>
#include <cerrno>
#include <cstring>
-#include <filesystem>
+#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__)
+ #include <filesystem>
+#else
+ // This is only reachable if we're using GCC 7 (note: gem5 does not
support
+ // GCC versions older than GCC 7 as they do not support the C++17
+ // standard).
+ // If we're using GCC 7, we need to use <experimental/filesystem>.
+ #include <experimental/filesystem>
+ namespace std {
+ namespace filesystem = experimental::filesystem;
+ }
+#endif
#include "base/logging.hh"
#include "base/output.hh"
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
Gerrit-Change-Number: 69840
Gerrit-PatchSet: 1
Gerrit-Owner: Melissa Jost <melissakjost@gmail.com>
Gerrit-MessageType: newchange