mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-14 13:30:29 -05:00
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:
@@ -18,6 +18,13 @@ set_property(DIRECTORY
|
|||||||
"KWIML_HEADER(%)=<${KWIML}/%>"
|
"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)
|
if(KWIML_LANGUAGE_C)
|
||||||
set(test_srcs test.c)
|
set(test_srcs test.c)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user