aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-03-12 16:23:05 +1100
committerNicolas James <nj3ahxac@gmail.com>2026-03-12 16:23:05 +1100
commita19308a35e88cd53c0d5ac2f26c705f902804658 (patch)
tree368eff0e893296329e9daf71dad7978c4e40d418 /CMakeLists.txt
parentcc4c4fe1015648e1c19c9b35a7a1098f6cf463c1 (diff)
Add reasonable compiler warnings and fix them
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt35
1 files changed, 19 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 021f56b..2e4188a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,21 +40,24 @@ add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD
"${OUTPUT_DIR}/"
)
-set(SANITIZE_FLAGS
- -fsanitize=address,undefined,leak
- -fno-omit-frame-pointer
- -fno-optimize-sibling-calls
- -fno-sanitize-recover=all
- -fsanitize-address-use-after-scope
-)
-
target_compile_options(${LIBRARY_NAME} PRIVATE
- #${SANITIZE_FLAGS}
- -g3
- -O1
+ # Inherited from Mesa.
+ -g
+ -O2
-D_GLIBCXX_ASSERTIONS
-)
-
-target_link_options(${LIBRARY_NAME} PRIVATE
- #${SANITIZE_FLAGS}
-)
+ -D__STDC_CONSTANT_MACROS
+ -D__STDC_FORMAT_MACROS
+ -D__STDC_LIMIT_MACROS
+
+ # Things I like.
+ -Wall
+ -Wextra
+ -Wundef
+ -Wconversion
+ -Wdouble-promotion
+
+ -Wno-unused-parameter
+ -Wno-unused-function
+ -Wno-sign-conversion
+ -Wno-missing-field-initializers
+) \ No newline at end of file