From 62010520edc734df16c48f9dbb238143279abd7a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 22 Aug 2018 07:58:51 -0700 Subject: [PATCH] Disable gnu-string-literal-operator-template warning --- CMakeLists.txt | 8 -------- include/fmt/format.h | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d2d59e8..e469a175 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,14 +111,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wno-zero-as-null-pointer-constant) endif () - -endif () - -check_cxx_compiler_flag( - -Wno-gnu-string-literal-operator-template HAS_GNU_UDL_WARNING) -if (HAS_GNU_UDL_WARNING) - set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} - -Wno-gnu-string-literal-operator-template) endif () if (MSVC) diff --git a/include/fmt/format.h b/include/fmt/format.h index d4432293..9bdf9a1c 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -65,6 +65,10 @@ # pragma GCC diagnostic ignored "-Wsign-conversion" #endif +# if FMT_CLANG_VERSION +# pragma GCC diagnostic ignored "-Wgnu-string-literal-operator-template" +# endif + #ifdef _SECURE_SCL # define FMT_SECURE_SCL _SECURE_SCL #else