Supress -Wimplicit-fallthrough and -Wsign-conversion when including fmt headers

This commit is contained in:
gabime 2019-12-05 01:12:55 +02:00
parent 0db4b04ad3
commit 31fc1aca53
2 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,12 @@
// By default spdlog include its own copy.
//
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#if !defined(SPDLOG_FMT_EXTERNAL)
#ifdef SPDLOG_HEADER_ONLY
#ifndef FMT_HEADER_ONLY
@ -25,3 +31,4 @@
#include <fmt/core.h>
#include <fmt/format.h>
#endif
#pragma GCC diagnostic pop

View File

@ -6,9 +6,17 @@
// Copyright (c) 2012 - 2016, Victor Zverovich
// All rights reserved.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#if !defined(SPDLOG_FMT_EXTERNAL)
#include "spdlog/fmt/bundled/format-inl.h"
#pragma GCC diagnostic pop
FMT_BEGIN_NAMESPACE
template struct FMT_API internal::basic_data<void>;