summaryrefslogtreecommitdiffhomepage
path: root/userconfig-runner@Linux-GNU.cmake
blob: 963027ba2780d9f1abd2a009caddc588eba6d2ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
sets(BOOL FLOORMAT_PRECOMPILED-HEADERS OFF)
sets(BOOL FLOORMAT_SUBMODULE-SDL2 OFF)
set(CMAKE_INSTALL_MESSAGE NEVER)
sets(STRING
     CMAKE_BUILD_TYPE RELEASE
     CMAKE_C_FLAGS_RELEASE "-O0 -DNDEBUG -s"
     CMAKE_CXX_FLAGS_RELEASE "-O0 -DNDEBUG -s")

add_compile_options(-fsanitize=address,undefined)
add_link_options(-fsanitize=address,undefined)
sets(BOOL CORRADE_CPU_USE_IFUNC OFF)

# for floormat sources only
function(fm-userconfig-src)
    add_compile_options(-Wall -Wextra -Wpedantic -Wno-old-style-cast -Wno-padded)
    add_compile_options(-g -ggdb)

    add_compile_options(
        -Wall
        -Wextra
        -Wpedantic
        #-Weverything
        #-Wno-c++20-compat
        -Wno-switch-enum
        #-Wno-old-style-cast
        #-Wno-shadow
        -Wno-ctad-maybe-unsupported
        -Wno-ignored-attributes
        #-Wno-array-bounds
        -Wno-subobject-linkage
    )
    add_compile_options(
        #-Werror
        -Wno-error=float-equal
        #-Wno-error=comma
        -Wno-error=unused-parameter
        -Wno-error=unused-variable
        -Wno-error=unused-function
        -Wno-error=unused-macros
        #-Wno-error=alloca
        -Wno-error=double-promotion
        -Wno-error=restrict
        -Wno-error=unused-but-set-variable
        -Wno-error=subobject-linkage
        -Wno-error=array-bounds
    )
endfunction()