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.
This commit is contained in:
Lenny Maiorani 2021-04-18 15:35:58 -06:00 committed by Linus Groh
parent 4f9ab0b982
commit df916c9738

View file

@ -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)