testautomation: avoid format related warnings by using a few pragma's

ci: enable -Werror to a few platforms
This commit is contained in:
Anonymous Maarten
2022-10-06 00:31:00 +02:00
committed by Anonymous Maarten
parent d04fa0ef76
commit 274ec02581
5 changed files with 177 additions and 2 deletions

View File

@@ -160,6 +160,25 @@ add_executable(controllermap controllermap.c testutils.c)
add_executable(testvulkan testvulkan.c)
add_executable(testoffscreen testoffscreen.c)
cmake_push_check_state(RESET)
check_c_compiler_flag(-Wformat-overflow HAVE_WFORMAT_OVERFLOW)
if(HAVE_WFORMAT_OVERFLOW)
target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT_OVERFLOW)
endif()
check_c_compiler_flag(-Wformat HAVE_WFORMAT)
if(HAVE_WFORMAT)
target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT)
endif()
check_c_compiler_flag(-Wformat-extra-args HAVE_WFORMAT_EXTRA_ARGS)
if(HAVE_WFORMAT_EXTRA_ARGS)
target_compile_definitions(testautomation PRIVATE HAVE_WFORMAT_EXTRA_ARGS)
endif()
cmake_pop_check_state()
SET(ALL_TESTS
checkkeys
checkkeysthreads