Skip to content

Commit

Permalink
Remove Intel zlib support due to broken CMake (intel/zlib#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Feb 27, 2020
1 parent b4b2cc0 commit f172675
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 55 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,47 @@ This is the simplest way to compile pigz. Type "make" in the source directory ("

## Compiling with CMake

Compiling with CMake is more complicated than using Make. However, it does allow you to use different variants of the zlib compression library that can [improve](https://github.com/neurolabusc/pigz-bench) performance. Compiling with CMake requires the computer to have CMake and git installed. By default, CMake will use the [CloudFlare zlib](https://github.com/cloudflare/zlib):
Compiling with CMake is more complicated than using Make. However, it does allow you to use different variants of the zlib compression library that can [improve](https://github.com/neurolabusc/pigz-bench) performance. Compiling with CMake requires the computer to have CMake and git installed. By default, CMake will use the [CloudFlare zlib](https://github.com/cloudflare/zlib) which provides outstanding compression performance:

```
git clone https://github.com/neurolabusc/pigz.git
git clone https://github.com/madler/pigz
cd pigz
mkdir build && cd build
cmake ..
make
```

Alternatively, you can build for [zlib-ng](https://github.com/zlib-ng/zlib-ng):
Alternatively, you can build for your system zlib, which will likely provide the poorest performance (but is the most popular so least likely to have any issues):

```
git clone https://github.com/neurolabusc/pigz.git
git clone https://github.com/madler/pigz
cd pigz
mkdir build && cd build
cmake -DZLIB_IMPLEMENTATION=ng ..
cmake -DZLIB_IMPLEMENTATION=System ..
make
```

Finally, you can build for your system zlib, which will likely provide the poorest performance (but is the most popular so least likely to have any issues):
Finally, you can build for [zlib-ng](https://github.com/zlib-ng/zlib-ng). At the moment this provides compression performance between CloudFlare and System, but provides exceptionally fast decompression:

```
git clone https://github.com/neurolabusc/pigz.git
git clone https://github.com/madler/pigz
cd pigz
mkdir build && cd build
cmake -DZLIB_IMPLEMENTATION=System ..
cmake -DZLIB_IMPLEMENTATION=ng ..
make
```

Note that the process is a little different if you are using the Windows operating system. Windows users can compile using the [Microsoft C Compiler](https://visualstudio.microsoft.com/downloads/) or [MinGW]( http://mingw-w64.org/doku.php). Be aware there are several variations of the MinGW compiler, and the CMake script expects a version that supports the [-municode linker flag]( https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/). This flag is required to handle non-Latin letters in filenames. Here is an example of compiling on Windows targeting the Cloudflare zlib:

```
git clone https://github.com/neurolabusc/pigz.git
git clone https://github.com/madler/pigz
cd pigz
mkdir build
cd build
cmake -DZLIB_IMPLEMENTATION=Cloudflare ..
cmake --build . --config Release
```


## Details

pigz 2.4 (26 Dec 2017) by Mark Adler
Expand Down
16 changes: 0 additions & 16 deletions SuperBuild/External-CHROMIUM-ZLIB.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion SuperBuild/External-CLOUDFLARE-ZLIB.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CLOUDFLARE_BRANCH gcc.amd64) # Cloudflare zlib branch

ExternalProject_Add(zlib
GIT_REPOSITORY "${git_protocol}://github.com/ningfei/zlib.git"
GIT_REPOSITORY "${git_protocol}://github.com/cloudflare/zlib.git"
GIT_TAG "${CLOUDFLARE_BRANCH}"
SOURCE_DIR cloudflare-zlib
BINARY_DIR cloudflare-zlib-build
Expand Down
16 changes: 0 additions & 16 deletions SuperBuild/External-INTEL-ZLIB.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions SuperBuild/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@ if(${ZLIB_IMPLEMENTATION} STREQUAL "Cloudflare")
list(APPEND DEPENDENCIES zlib)
set(BUILD_CLOUDFLARE-ZLIB TRUE)
message("-- Will build Cloudflare zlib from github")
elseif(${ZLIB_IMPLEMENTATION} STREQUAL "Chromium")
message("-- Build with Chromium zlib: ON")
include(${CMAKE_SOURCE_DIR}/SuperBuild/External-CHROMIUM-ZLIB.cmake)
list(APPEND DEPENDENCIES zlib)
set(BUILD_CHROMIUM-ZLIB TRUE)
message("-- Will build Chromium zlib from github")
elseif(${ZLIB_IMPLEMENTATION} STREQUAL "Intel")
message("-- Build with Intel zlib: ON")
include(${CMAKE_SOURCE_DIR}/SuperBuild/External-INTEL-ZLIB.cmake)
list(APPEND DEPENDENCIES zlib)
set(BUILD_INTEL-ZLIB TRUE)
message("-- Will build Intel zlib from github")
elseif(${ZLIB_IMPLEMENTATION} STREQUAL "ng")
message("-- Build with zlib-ng: ON")
include(${CMAKE_SOURCE_DIR}/SuperBuild/External-ZLIBng.cmake)
Expand Down

0 comments on commit f172675

Please sign in to comment.