diff --git a/test/gtest/src/gtest.cc b/test/gtest/src/gtest.cc
index a5b4e5a..1dff1a6 100644
--- a/test/gtest/src/gtest.cc
+++ b/test/gtest/src/gtest.cc
@@ -34,6 +34,10 @@
 #include "gtest/internal/custom/gtest.h"
 #include "gtest/gtest-spi.h"
 
+#ifndef _WIN32
+#pragma GCC system_header
+#endif
+
 #include <ctype.h>
 #include <math.h>
 #include <stdarg.h>
