cmake/Utilities/cmbzip2/CMakeLists.txt

22 lines
701 B
CMake
Raw Normal View History

2010-06-23 01:18:35 +03:00
project(bzip2)
2020-08-30 11:54:41 +02:00
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
2022-03-29 21:10:50 +02:00
"^(GNU|LCC|Clang|AppleClang|IBMClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
2020-08-30 11:54:41 +02:00
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
endif()
2022-08-04 22:12:04 +02:00
# Activate POSIX APIs.
if(CMAKE_SYSTEM_NAME MATCHES "^(AIX|OS400)$")
add_definitions(-D_ALL_SOURCE)
endif()
if(NOT CMAKE_SYSTEM_NAME MATCHES "BSD|Darwin|Windows")
add_definitions(-D_XOPEN_SOURCE=600)
endif()
2010-06-23 01:18:35 +03:00
add_definitions(-D_FILE_OFFSET_BITS=64)
add_library(cmbzip2
blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c)