summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-12 14:39:40 (GMT)
committerBrad King <brad.king@kitware.com>2011-11-12 14:39:40 (GMT)
commit6d12ab3f897310354bbaffd7a07b0458f489a7df (patch)
tree8d50e35e7d06de2ea3113b9f146ba0379296ca1d /test
parent553acec76b2dc333a418e0218d65dacb76e30a81 (diff)
downloadCMake-6d12ab3f897310354bbaffd7a07b0458f489a7df.zip
CMake-6d12ab3f897310354bbaffd7a07b0458f489a7df.tar.gz
CMake-6d12ab3f897310354bbaffd7a07b0458f489a7df.tar.bz2
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.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index aaff9e9..15816cf 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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()