mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Meta: Move compiler flags into standalone CMake files
This way we can have all of them in a single place, similar to how we structure options added via the serenity_option() macro.
This commit is contained in:
parent
4472cab81a
commit
ee721978f6
5 changed files with 76 additions and 75 deletions
12
Meta/CMake/common_compile_options.cmake
Normal file
12
Meta/CMake/common_compile_options.cmake
Normal file
|
@ -0,0 +1,12 @@
|
|||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
add_compile_options(-Wall)
|
||||
add_compile_options(-Wextra)
|
||||
|
||||
if (NOT CMAKE_HOST_SYSTEM_NAME MATCHES SerenityOS)
|
||||
# FIXME: Something makes this go crazy and flag unused variables that aren't flagged as such when building with the toolchain.
|
||||
# Disable -Werror for now.
|
||||
add_compile_options(-Werror)
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue