summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/CMakeLists.txt
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/cmliblzma/CMakeLists.txt
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/cmliblzma/CMakeLists.txt')
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt10
1 files changed, 10 insertions, 0 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)