From: Nathan Moinvaziri Date: Sat, 22 Jan 2022 21:05:44 +0000 (-0800) Subject: Allow setting of version when building with pigz. X-Git-Tag: 2.1.0-beta1~424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f879f27b1151015c8a6e545ba18c021ed839e32;p=thirdparty%2Fzlib-ng.git Allow setting of version when building with pigz. --- diff --git a/test/pigz/CMakeLists.txt b/test/pigz/CMakeLists.txt index 43082cf2..0d5bc864 100644 --- a/test/pigz/CMakeLists.txt +++ b/test/pigz/CMakeLists.txt @@ -13,6 +13,7 @@ # WITH_CODE_COVERAGE - Enable code coverage reporting # WITH_THREADS - Enable threading support # PIGZ_ENABLE_TESTS - Enable adding unit tests +# PIGZ_VERSION - Set the version of pigz to build # ZLIB_ROOT - Path to the zlib source directory # PTHREADS4W_ROOT - Path to pthreads4w source directory on Windows. # If not specified then threading will be disabled. @@ -28,6 +29,7 @@ include(../../cmake/detect-coverage.cmake) option(WITH_CODE_COVERAGE "Enable code coverage reporting" OFF) option(WITH_THREADS "Enable threading support" ON) option(PIGZ_ENABLE_TESTS "Build unit tests" ON) +option(PIGZ_VERSION "Set the version of pigz to build" "") project(pigz LANGUAGES C) @@ -54,8 +56,14 @@ elseif(WIN32) endif() # Fetch pigz source code from official repository +if(PIGZ_VERSION STREQUAL "") + set(PIGZ_TAG master) +else() + set(PIGZ_TAG ${PIGZ_VERSION}) +endif() FetchContent_Declare(pigz - GIT_REPOSITORY https://github.com/madler/pigz.git) + GIT_REPOSITORY https://github.com/madler/pigz.git + GIT_TAG ${PIGZ_TAG}) FetchContent_MakeAvailable(pigz) FetchContent_GetProperties(pigz)