Skip to content

Commit 094306e

Browse files
BertalanDlinusg
authored andcommitted
CMake: Load compiler flags from the Serenity repo
Currently, we fail to suppress some warnings on AArch64. Let's use the tried-and-true flags of a regular Lagom build. Note that this has the effect of setting some non-warning flags as well (e.g. `-g1`, `-fno-semantic-interposition`), but they don't hurt us.
1 parent 21bde7d commit 094306e

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

CMakeLists.txt

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,6 @@ if (NOT APPLE)
1414
endif()
1515
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
1616

17-
# Copied from Serenity's root CMakeLists.txt
18-
add_compile_options(-Wall)
19-
add_compile_options(-Wextra)
20-
add_compile_options(-Wno-address-of-packed-member)
21-
add_compile_options(-Wcast-align)
22-
add_compile_options(-Wcast-qual)
23-
add_compile_options(-Wno-deprecated-copy)
24-
add_compile_options(-Wduplicated-cond)
25-
add_compile_options(-Wdouble-promotion)
26-
add_compile_options(-Wno-expansion-to-defined)
27-
add_compile_options(-Wformat=2)
28-
add_compile_options(-Wimplicit-fallthrough)
29-
add_compile_options(-Wno-literal-suffix)
30-
add_compile_options(-Wlogical-op)
31-
add_compile_options(-Wmisleading-indentation)
32-
add_compile_options(-Wmissing-declarations)
33-
add_compile_options(-Wno-nonnull-compare)
34-
add_compile_options(-Wnon-virtual-dtor)
35-
add_compile_options(-Wno-unknown-warning-option)
36-
add_compile_options(-Wundef)
37-
add_compile_options(-Wunused)
38-
add_compile_options(-Wwrite-strings)
39-
add_compile_options(-fno-exceptions)
40-
4117
option(ENABLE_ADDRESS_SANITIZER "Enable address sanitizer testing in gcc/clang" OFF)
4218
option(ENABLE_UNDEFINED_SANITIZER "Enable undefined behavior sanitizer testing in gcc/clang" OFF)
4319

@@ -54,3 +30,4 @@ endif()
5430
include (FetchContent)
5531
include (cmake/FetchLagom.cmake)
5632

33+
include(${Lagom_SOURCE_DIR}/../CMake/lagom_compile_options.cmake)

0 commit comments

Comments
 (0)