mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
Meta: Move more common flags to common_compile_options.cmake
For the most part no behavior change, except that we now pass -Wno-implicit-const-int-float-conversion and -Wno-literal-suffix only to clang and gcc each in both lagom and serenity builds, while we previously passed them to both in lagom builds (and passed them to one each in serenity builds). The former is a clang flag, the latter a gcc flag, but since we also use -Wno-unknown-warning-option it doesn't really matter.
This commit is contained in:
parent
5872fe6536
commit
8f988b7bae
4 changed files with 13 additions and 11 deletions
|
@ -17,3 +17,15 @@ if (NOT CMAKE_HOST_SYSTEM_NAME MATCHES SerenityOS)
|
|||
# Disable -Werror for now.
|
||||
add_compile_options(-Werror)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
||||
# Clang's default constexpr-steps limit is 1048576(2^20), GCC doesn't have one
|
||||
add_compile_options(-fconstexpr-steps=16777216)
|
||||
|
||||
add_compile_options(-Wno-implicit-const-int-float-conversion)
|
||||
add_compile_options(-Wno-user-defined-literals)
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# Only ignore expansion-to-defined for g++, clang's implementation doesn't complain about function-like macros
|
||||
add_compile_options(-Wno-expansion-to-defined)
|
||||
add_compile_options(-Wno-literal-suffix)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue