Note for future experiment.

This commit is contained in:
wb2osz 2022-03-24 00:19:51 +01:00
parent 368bc42337
commit 18c65f48a8
1 changed files with 6 additions and 0 deletions

View File

@ -205,10 +205,16 @@ if (C_CLANG OR C_GCC)
# I also took out -Wextra because it spews out so much noise a serious problem was not noticed.
# It might go back in someday when I have more patience to clean up all the warnings.
#
# TODO:
# Try error checking -fsanitize=bounds-strict -fsanitize=leak
# Requires libubsan and liblsan, respectively.
###set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE ${EXTRA_FLAGS}")
if(FREEBSD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize -D_DEFAULT_SOURCE ${EXTRA_FLAGS}")
else()
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wvla -ffast-math -ftree-vectorize -D_GNU_SOURCE -fsanitize=bounds-strict ${EXTRA_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wvla -ffast-math -ftree-vectorize -D_GNU_SOURCE ${EXTRA_FLAGS}")
endif()
#