1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00

bzip2: Add compilation flags to disable warnings in third-party code

This commit is contained in:
Brad King
2020-02-24 12:10:07 -05:00
parent 3d47b0ae97
commit 35acaa90c5

View File

@@ -1,4 +1,13 @@
project(bzip2)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|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()
add_definitions(-D_FILE_OFFSET_BITS=64)
add_library(cmbzip2
blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c)