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:
Brad King 2011-11-12 09:39:40 -05:00
parent 553acec76b
commit 6d12ab3f89
1 changed files with 7 additions and 0 deletions

View File

@ -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()