summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-23 15:55:25 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-29 12:45:36 (GMT)
commit90e7a4d41f588d87415381fdb507735e6438992c (patch)
tree905d32e3ba9668c77743afea52dc81fdd05b7123 /Utilities
parentc20b45027e8288114fd6ee33f99218440b60da77 (diff)
downloadCMake-90e7a4d41f588d87415381fdb507735e6438992c.zip
CMake-90e7a4d41f588d87415381fdb507735e6438992c.tar.gz
CMake-90e7a4d41f588d87415381fdb507735e6438992c.tar.bz2
liblzma: Disable warnings to avoid changing 3rd party code
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt10
-rw-r--r--Utilities/cmliblzma/common/sysdefs.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index 85efa8c..fc50dbe 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -190,6 +190,16 @@ INCLUDE_DIRECTORIES(
"${CMLIBLZMA_BINARY_DIR}"
)
+# 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}" MATCHES "^(PathScale)$")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
+ELSEIF(BORLAND)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ENDIF()
+
ADD_LIBRARY(cmliblzma ${LZMA_SRCS})
INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma)
diff --git a/Utilities/cmliblzma/common/sysdefs.h b/Utilities/cmliblzma/common/sysdefs.h
index 7481e3d..c84f01c 100644
--- a/Utilities/cmliblzma/common/sysdefs.h
+++ b/Utilities/cmliblzma/common/sysdefs.h
@@ -17,7 +17,9 @@
#define LZMA_SYSDEFS_H
#if defined(_MSC_VER)
-# pragma warning(disable: 4028 4244 4761)
+# pragma warning(push,1)
+# pragma warning(disable: 4142) /* benign redefinition of type */
+# pragma warning(disable: 4761) /* integral size mismatch in argument */
#endif
//////////////