Throwing some extra C compiler warnings into the CMakeLists. Found and dealt with some double-to-float conversions, cut CPU use down to about 10%.

This commit is contained in:
Rezmason
2022-06-07 18:23:53 -07:00
parent 346bbbb84d
commit c0e94627e7
2 changed files with 14 additions and 12 deletions

View File

@@ -36,8 +36,11 @@ file(GLOB IMAGES
if (TOOLCHAIN STREQUAL "armgcc")
add_executable(${PLAYDATE_GAME_DEVICE} ${SDK}/C_API/buildsupport/setup.c main.c)
target_compile_options(${PLAYDATE_GAME_DEVICE} PUBLIC -Wstrict-prototypes -Wdouble-promotion -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla )
else()
add_library(${PLAYDATE_GAME_NAME} SHARED main.c ${IMAGES})
target_compile_options(${PLAYDATE_GAME_NAME} PUBLIC -Wstrict-prototypes -Wdouble-promotion -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla )
endif()
include(${SDK}/C_API/buildsupport/playdate_game.cmake)