summaryrefslogtreecommitdiff
path: root/Utilities/cmlibrhash
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-03 11:23:36 -0400
committerBrad King <brad.king@kitware.com>2016-11-10 08:26:55 -0500
commitbb01f20e993bbd19b00e07ff0094b155aa0859de (patch)
tree5b899e4e89f3a0480d699d340cb583c7855982e0 /Utilities/cmlibrhash
parent31bb727f3b239b541e1ff5679b3c461e9a05f227 (diff)
downloadcmake-bb01f20e993bbd19b00e07ff0094b155aa0859de.tar.gz
librhash: Disable warnings to avoid changing 3rd party code
Add '-w' or equivalent flag on compilers supporting it. Tell MSVC to use its lowest warning level inside librhash sources.
Diffstat (limited to 'Utilities/cmlibrhash')
-rw-r--r--Utilities/cmlibrhash/CMakeLists.txt8
-rw-r--r--Utilities/cmlibrhash/librhash/ustd.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/Utilities/cmlibrhash/CMakeLists.txt b/Utilities/cmlibrhash/CMakeLists.txt
index 47d069ae0b..968a792fe2 100644
--- a/Utilities/cmlibrhash/CMakeLists.txt
+++ b/Utilities/cmlibrhash/CMakeLists.txt
@@ -1,5 +1,13 @@
project(librhash C)
+# Disable warnings to avoid changing 3rd party code.
+if(CMAKE_C_COMPILER_ID MATCHES
+ "^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
+endif()
+
set(librhash_sources
librhash/algorithms.c
librhash/algorithms.h
diff --git a/Utilities/cmlibrhash/librhash/ustd.h b/Utilities/cmlibrhash/librhash/ustd.h
index 38c4e3e20f..5bd9aacb49 100644
--- a/Utilities/cmlibrhash/librhash/ustd.h
+++ b/Utilities/cmlibrhash/librhash/ustd.h
@@ -5,6 +5,10 @@
/* Include KWSys Large File Support configuration. */
#include <cmsys/Configure.h>
+#if defined(_MSC_VER)
+# pragma warning(push,1)
+#endif
+
#if _MSC_VER >= 1300
# define int64_t __int64