summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()