summaryrefslogtreecommitdiffstats
path: root/Utilities/KWIML
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-15 19:30:58 (GMT)
committerBrad King <brad.king@kitware.com>2011-11-15 19:30:58 (GMT)
commit5be0e92218f4f82766389d7c8bb3193d98a09a87 (patch)
tree4c41a20e1c7618634eaf601a102c471bc52728ae /Utilities/KWIML
parent93cebcaf23118425c1ac51fcd07073c376be4e34 (diff)
parenta8f6159f69dbfdacf4d48ff26f21862d83fa7fd8 (diff)
downloadCMake-5be0e92218f4f82766389d7c8bb3193d98a09a87.zip
CMake-5be0e92218f4f82766389d7c8bb3193d98a09a87.tar.gz
CMake-5be0e92218f4f82766389d7c8bb3193d98a09a87.tar.bz2
Merge branch 'upstream-kwiml' into import-KWIML
Diffstat (limited to 'Utilities/KWIML')
-rw-r--r--Utilities/KWIML/INT.h.in7
-rw-r--r--Utilities/KWIML/test/CMakeLists.txt17
-rw-r--r--Utilities/KWIML/test/test.h4
3 files changed, 24 insertions, 4 deletions
diff --git a/Utilities/KWIML/INT.h.in b/Utilities/KWIML/INT.h.in
index 4a6298a..3c1f05d 100644
--- a/Utilities/KWIML/INT.h.in
+++ b/Utilities/KWIML/INT.h.in
@@ -191,9 +191,10 @@ An includer may test the following macros after inclusion:
#endif
#if defined(__INTEL_COMPILER)
-#elif defined(__SUNPRO_C) && __SUNPRO_C < 0x570
-# define @KWIML@_INT__NO_SCN8
-#elif defined(__SUNPRO_CC) && __SUNPRO_CC < 0x570
+# if defined(_WIN32)
+# define @KWIML@_INT__NO_SCN8
+# endif
+#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# define @KWIML@_INT__NO_SCN8
#elif defined(__HP_cc) || defined(__HP_aCC)
# define @KWIML@_INT__NO_SCN8
diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt
index aaff9e9..febc994 100644
--- a/Utilities/KWIML/test/CMakeLists.txt
+++ b/Utilities/KWIML/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()
@@ -49,3 +56,13 @@ set_property(TARGET ${KWIML}_test PROPERTY
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_test(${KWIML}.test ${CMAKE_CURRENT_BINARY_DIR}/${KWIML}_test)
set_property(TEST ${KWIML}.test PROPERTY LABELS ${KWIML_LABELS_TEST})
+
+# Xcode 2.x forgets to create the output directory before linking
+# the individual architectures.
+if(CMAKE_OSX_ARCHITECTURES AND XCODE
+ AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
+ add_custom_command(
+ TARGET ${KWIML}_test
+ PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
+ )
+endif()
diff --git a/Utilities/KWIML/test/test.h b/Utilities/KWIML/test/test.h
index 8abb195..b87a0e7 100644
--- a/Utilities/KWIML/test/test.h
+++ b/Utilities/KWIML/test/test.h
@@ -28,7 +28,9 @@
#define KWIML_HEADER1(x) <x>
/* Quiet MS standard library deprecation warnings. */
-#define _CRT_SECURE_NO_DEPRECATE
+#ifndef _CRT_SECURE_NO_DEPRECATE
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
#else
# error "test.h included multiple times."