KWIML: Suppress printf/scanf format warnings in test
KWIML defines format string macros matching the fixed-sized types. This test checks that they behave as expected and that the arguments match the *sizes* expected by the format strings.
This commit is contained in:
parent
553acec76b
commit
6d12ab3f89
|
@ -18,6 +18,13 @@ set_property(DIRECTORY
|
|||
"KWIML_HEADER(%)=<${KWIML}/%>"
|
||||
)
|
||||
|
||||
# Suppress printf/scanf format warnings; we test if the sizes match.
|
||||
foreach(lang C CXX)
|
||||
if(KWIML_LANGUAGE_${lang} AND "${CMAKE_${lang}_COMPILER_ID}" STREQUAL GNU)
|
||||
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(KWIML_LANGUAGE_C)
|
||||
set(test_srcs test.c)
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue