Skip to content

Commit

Permalink
Switch to building libdeflate with cmake
Browse files Browse the repository at this point in the history
Following removal of the Makefile in libdeflate commit 03fba38bd
  • Loading branch information
daviesrob authored and whitwham committed Oct 12, 2022
1 parent 4604554 commit 853b801
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ libdeflate_template: &LIBDEFLATE
pushd "$HOME"
git clone --depth 1 https://github.com/ebiggers/libdeflate.git
pushd libdeflate
make -j 4 CFLAGS='-fPIC -O3' libdeflate.a
cmake -B build -DLIBDEFLATE_BUILD_SHARED_LIB=OFF -DLIBDEFLATE_BUILD_GZIP=OFF -DCMAKE_C_FLAGS='-g -O3 -fPIC'
cmake --build build --verbose
popd
popd
fi
Expand All @@ -27,7 +28,7 @@ compile_template: &COMPILE
compile_script: |
git submodule update --init --recursive
if test "x$USE_LIBDEFLATE" = "xyes"; then
CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="$LDFLAGS -L$HOME/libdeflate" --with-libdeflate'
CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="$LDFLAGS -L$HOME/libdeflate/build" --with-libdeflate'
else
CONFIG_OPTS='--without-libdeflate'
fi
Expand Down Expand Up @@ -75,6 +76,13 @@ gcc_task:
CFLAGS: -std=c99 -pedantic -Wformat=2
USE_LIBDEFLATE: yes

install_script: |
apt-get update
apt-get install -y --no-install-suggests --no-install-recommends \
ca-certificates libc-dev make git autoconf automake \
zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev \
cmake
<< : *LIBDEFLATE
<< : *COMPILE
<< : *TEST
Expand Down Expand Up @@ -187,8 +195,9 @@ macosx_task:
USE_CONFIG: yes
USE_LIBDEFLATE: yes

package_install_script:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz git
package_install_script: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz git \
cmake
<< : *LIBDEFLATE
<< : *COMPILE
Expand Down

0 comments on commit 853b801

Please sign in to comment.