diff --git a/README.md b/README.md index d2b08ab..ed31855 100644 --- a/README.md +++ b/README.md @@ -13,40 +13,40 @@ 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 @@ -54,7 +54,6 @@ cmake -DZLIB_IMPLEMENTATION=Cloudflare .. cmake --build . --config Release ``` - ## Details pigz 2.4 (26 Dec 2017) by Mark Adler diff --git a/SuperBuild/External-CHROMIUM-ZLIB.cmake b/SuperBuild/External-CHROMIUM-ZLIB.cmake deleted file mode 100644 index da4184e..0000000 --- a/SuperBuild/External-CHROMIUM-ZLIB.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(CHROMIUM_BRANCH developChromium) # Chromium zlib branch - -ExternalProject_Add(zlib - GIT_REPOSITORY "${git_protocol}://github.com/rogiedodgie/zlib" - GIT_TAG "${CHROMIUM_BRANCH}" - SOURCE_DIR chromium-zlib - BINARY_DIR chromium-zlib-build - CMAKE_ARGS - -Wno-dev - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH=${DEP_INSTALL_DIR} - -DBUILD_SHARED_LIBS:STRING=OFF -) - -set(CMAKE_FIND_LIBRARY_SUFFIXES .a) -set(ZLIB_ROOT ${DEP_INSTALL_DIR}) diff --git a/SuperBuild/External-CLOUDFLARE-ZLIB.cmake b/SuperBuild/External-CLOUDFLARE-ZLIB.cmake index 9f064eb..4742228 100644 --- a/SuperBuild/External-CLOUDFLARE-ZLIB.cmake +++ b/SuperBuild/External-CLOUDFLARE-ZLIB.cmake @@ -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 diff --git a/SuperBuild/External-INTEL-ZLIB.cmake b/SuperBuild/External-INTEL-ZLIB.cmake deleted file mode 100644 index e0abfe3..0000000 --- a/SuperBuild/External-INTEL-ZLIB.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(INTEL_BRANCH master) # INTEL zlib branch - -ExternalProject_Add(zlib - GIT_REPOSITORY "${git_protocol}://github.com/neurolabusc/zlib" - GIT_TAG "${INTEL_BRANCH}" - SOURCE_DIR intel-zlib - BINARY_DIR intel-zlib-build - CMAKE_ARGS - -Wno-dev - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH=${DEP_INSTALL_DIR} - -DBUILD_SHARED_LIBS:STRING=OFF -) - -set(CMAKE_FIND_LIBRARY_SUFFIXES .a) -set(ZLIB_ROOT ${DEP_INSTALL_DIR}) diff --git a/SuperBuild/SuperBuild.cmake b/SuperBuild/SuperBuild.cmake index c799635..bb5f6c1 100644 --- a/SuperBuild/SuperBuild.cmake +++ b/SuperBuild/SuperBuild.cmake @@ -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)