Skip to content

Commit

Permalink
Option for zlib-ng build
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jan 29, 2020
1 parent 28dd6a9 commit 93ef899
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ Be aware that some pigz does not work on some [Linux systems](https://github.com

## Installing

The recommended method is to compile your own copy of pigz. This will ensure that pigz is built using the latest [glibc](https://github.com/madler/pigz/issues/68) version on your system
The recommended method is to compile your own copy of pigz. This will ensure that pigz is built using the latest [glibc](https://github.com/madler/pigz/issues/68) version on your system:

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


Expand All @@ -35,6 +38,7 @@ real 0m7.264s
/usr/local/bin/pigz
>sudo cp /usr/local/bin/pigz /usr/local/bin/pigz_old
>sudo cp ./pigz /usr/local/bin/pigz
>time 3dmerge -1blur_fwhm 6.0 -doall -prefix afni.brik.gz rest.nii
....
real 0m6.343s
```
Expand Down
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/rordenlab/zlib.git"
GIT_TAG "${CLOUDFLARE_BRANCH}"
SOURCE_DIR cloudflare-zlib
BINARY_DIR cloudflare-zlib-build
Expand Down
14 changes: 14 additions & 0 deletions SuperBuild/External-ZLIBng.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(NG_BRANCH develop) # zlib-ng branch

ExternalProject_Add(zlib
GIT_REPOSITORY "${git_protocol}://github.com/rordenlab/zlib-ng.git"
GIT_TAG "${NG_BRANCH}"
SOURCE_DIR ng-zlib
BINARY_DIR ng-zlib-build
CMAKE_ARGS
-Wno-dev
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_INSTALL_DIR}
)

set(ZLIB_ROOT ${DEP_INSTALL_DIR})
6 changes: 6 additions & 0 deletions SuperBuild/SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ 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 "ng")
message("-- Build with zlib-ng: ON")
include(${CMAKE_SOURCE_DIR}/SuperBuild/External-ZLIBng.cmake)
list(APPEND DEPENDENCIES zlib)
set(BUILD_CLOUDFLARE-ZLIB TRUE)
message("-- Will build zlib-ng from github")
elseif(${ZLIB_IMPLEMENTATION} STREQUAL "Custom")
set(ZLIB_ROOT ${ZLIB_ROOT} CACHE PATH "Specify custom zlib root directory.")
if(NOT ZLIB_ROOT)
Expand Down

0 comments on commit 93ef899

Please sign in to comment.