summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2023-08-02 14:17:17 +0000
committer0scar <qgt268@alumni.ku.dk>2023-08-14 10:11:29 +0000
commit378f91b70c54cc111684f4a3a8f2b868af570fd8 (patch)
treea16b67413892f3d3ee514ab30446fc87142c7566 /CMakeLists.txt
parent1ec17aeb185ec7851a41c0ba2ae14c95a1a3942e (diff)
Add reloading of state-specific keybindings bindings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 13 insertions, 11 deletions
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
$<$<NOT:$<C_COMPILER_ID:MSVC>>:-Wall -Wextra>
# Dont be pedantic when using hot reloading.