liblzma: Disable warnings to avoid changing 3rd party code

This commit is contained in:
Brad King 2014-07-23 11:55:25 -04:00
parent c20b45027e
commit 90e7a4d41f
2 changed files with 13 additions and 1 deletions

View File

@ -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)

View File

@ -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
//////////////