diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bf9871..06e20d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,11 +60,27 @@ if(DAW_BUILD_UBSAN AND DAW_BUILD_ASAN) message(FATAL_ERROR "You cannot build both asan and ubsan") endif() +# These are not actually used (TODO) +set(DEFAULT_ARGS + -m64 # Target 64-bit architechture + -Wall -Wextra # All the good default warnings + -Wfloat-equal + -Wundef + -Wshadow + -Wpointer-arith + -Wcast-align + -Wstrict-prototypes + -Wwrite-strings + -Wswitch-default + -Wconversion +) + +# These are not actually used (TODO) if(DAW_BUILD_DEBUG) - set(BUILD_OPTS -m64 -Og -ggdb3 -fno-omit-frame-pointer) + set(BUILD_OPTS ${DEFAULT_ARGS} -Og -ggdb3 -fno-omit-frame-pointer) else() - set(BUILD_OPTS -m64 -O2 -flto=auto -fuse-linker-plugin -ffat-lto-objects - -funroll-loops -ffast-math -fno-signed-zeros -fno-trapping-math + set(BUILD_OPTS ${DEFAULT_ARGS} -O2 -flto=auto -fuse-linker-plugin -ffat-lto-objects + -funroll-loops -fno-signed-zeros -fno-trapping-math -ffunction-sections -fdata-sections) endif() |
