From df916c97386de6a05a229327d524edc2668f7b1c Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sun, 18 Apr 2021 15:35:58 -0600 Subject: [PATCH] CMake: Quiet warnings about literal suffix Problem: - Newer versions of clang (ToT) have a similar `-Wliteral-suffix` warning as GCC. A previous commit enabled it for all compilers. This needs to be silenced for the entire build, but it currently only is silenced for some directories. Solution: - Move the `-Wno-literal-suffix` option up in the CMakeLists.txt so that it gets applied everywhere. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87fd0711438..ad04fb49e41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +add_compile_options(-Wno-literal-suffix) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") add_compile_options(-fconcepts) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") @@ -171,7 +172,6 @@ add_compile_options(-Wdouble-promotion) add_compile_options(-Wno-expansion-to-defined) add_compile_options(-Wformat=2) add_compile_options(-Wimplicit-fallthrough) -add_compile_options(-Wno-literal-suffix) add_compile_options(-Wlogical-op) add_compile_options(-Wmisleading-indentation) add_compile_options(-Wmissing-declarations)