瀏覽代碼

Disable warnings before including plog

Paul-Louis Ageneau 5 年之前
父節點
當前提交
eb0a5bd5a5
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      include/rtc/log.hpp

+ 14 - 0
include/rtc/log.hpp

@@ -19,8 +19,22 @@
 #ifndef RTC_LOG_H
 #define RTC_LOG_H
 
+// Disable warnings before including plog
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wall"
+#elif defined(_MSC_VER)
+#pragma warning(push, 0)
+#endif
+
 #include "plog/Log.h"
 
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic pop
+#elif defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
 namespace rtc {
 
 enum class LogLevel { // Don't change, it must match plog severity