summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-22 20:19:06 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-23 21:04:59 (GMT)
commite1afd072bce9f58db28e6d64118cf806b207f0fe (patch)
tree19567ea876cc9f9caec3e65869f295113c1935b3 /Utilities/cmlibarchive
parente2dc5561bbb440d2563c438261571e11e12c8c22 (diff)
downloadCMake-e1afd072bce9f58db28e6d64118cf806b207f0fe.zip
CMake-e1afd072bce9f58db28e6d64118cf806b207f0fe.tar.gz
CMake-e1afd072bce9f58db28e6d64118cf806b207f0fe.tar.bz2
libarchive: Suppress compiler warnings
We are not developing libarchive so we do not care about warnings.
Diffstat (limited to 'Utilities/cmlibarchive')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt8
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index a79c3a9..463b96c 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -46,6 +46,14 @@ math(EXPR INTERFACE_VERSION "11 + ${_minor}")
# ?? Should there be more here ??
SET(SOVERSION "${INTERFACE_VERSION}")
+# Disable warnings to avoid changing 3rd party code.
+IF("${CMAKE_C_COMPILER_ID}" MATCHES
+ "^(GNU|Clang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+ELSEIF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF()
+
# Enable CTest/CDash support
include(CTest)
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h
index 6bf89c2..ac44192 100644
--- a/Utilities/cmlibarchive/libarchive/archive_windows.h
+++ b/Utilities/cmlibarchive/libarchive/archive_windows.h
@@ -73,7 +73,8 @@
#if defined(_MSC_VER)
/* TODO: Fix the code, don't suppress the warnings. */
-#pragma warning(disable:4244) /* 'conversion' conversion from 'type1' to 'type2', possible loss of data */
+#pragma warning(push,1)
+#pragma warning(disable:4761) /* integral size mismatch in argument; conversion supplied */
#endif
#if defined(__BORLANDC__)
#pragma warn -8068 /* Constant out of range in comparison. */