From a19308a35e88cd53c0d5ac2f26c705f902804658 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Thu, 12 Mar 2026 16:23:05 +1100 Subject: Add reasonable compiler warnings and fix them --- CMakeLists.txt | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3