From 378f91b70c54cc111684f4a3a8f2b868af570fd8 Mon Sep 17 00:00:00 2001 From: 0scar Date: Wed, 2 Aug 2023 16:17:17 +0200 Subject: Add reloading of state-specific keybindings bindings --- CMakeLists.txt | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e93f70..7e3c2fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,16 @@ if(DAW_BUILD_UBSAN AND DAW_BUILD_ASAN) message(FATAL_ERROR "You cannot build both asan and ubsan") endif() +if(DAW_BUILD_DEBUG) + set(BUILD_OPTS -Og -ggdb3 -fno-omit-frame-pointer) +else() + set(BUILD_OPTS -O2 -flto=auto -fuse-linker-plugin -ffat-lto-objects + -funroll-loops -ffast-math -fno-signed-zeros -fno-trapping-math + -ffunction-sections -fdata-sections) +endif() + +## + set(ENGINE_SOURCES src/btree.c src/dltools.c @@ -76,6 +86,9 @@ set(ENGINE_SOURCES src/vector.c ) +add_compile_options(${RELEASE_OPTS}) +add_link_options(${RELEASE_OPTS}) + add_library(daw ${ENGINE_SOURCES}) @@ -102,17 +115,6 @@ if(DAW_BUILD_UBSAN AND NOT C_COMPILER_ID STREQUAL MSVC) add_link_options(-fsanitize=undefined -fsanitize-undefined-trap-on-error -fno-sanitize-recover) endif() -if(DAW_BUILD_DEBUG) - set(BUILD_OPTS -Og -ggdb3 -fno-omit-frame-pointer) -else() - set(BUILD_OPTS -O2 -flto=auto -fuse-linker-plugin -ffat-lto-objects - -funroll-loops -ffast-math -fno-signed-zeros -fno-trapping-math - -ffunction-sections -fdata-sections) -endif() - -add_compile_options(${RELEASE_OPTS}) -add_link_options(${RELEASE_OPTS}) - target_compile_options(${PROJECT_NAME} PUBLIC $<$>:-Wall -Wextra> # Dont be pedantic when using hot reloading. -- cgit v1.3