Skip to content

Commit

Permalink
Remove ZLIB_ENABLE_LFS
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-park committed Nov 3, 2023
1 parent d6fb381 commit 7eafb4f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ env:

jobs:
build:
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.lfs }}-${{ matrix.sanitize }}
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.sanitize }}
strategy:
fail-fast: false
matrix:
preset: [linux-clang, linux-gcc, macos, windows]
config: [Debug, Release]
lfs: [OFF, ON]
sanitize: [address, thread, undefined, leak, memory]
exclude:
- { preset: linux-gcc, sanitize: memory }
Expand Down Expand Up @@ -49,7 +48,6 @@ jobs:
cmake --preset ${{ matrix.preset }}
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
-DCPM_SOURCE_CACHE="${{ env.cpm-path }}"
-DZLIB_ENABLE_LFS=${{ matrix.lfs }}
-DZLIB_SANITIZE=${{ matrix.sanitize }}
- name: Build
Expand All @@ -62,13 +60,12 @@ jobs:
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install

build-mobile:
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.lfs }}
name: ${{ matrix.preset }}-${{ matrix.config }}
strategy:
fail-fast: false
matrix:
preset: [android, ios]
config: [Debug, Release]
lfs: [OFF, ON]
include:
- { preset: android, os: ubuntu-latest }
- { preset: ios, os: macos-latest }
Expand All @@ -91,7 +88,6 @@ jobs:
run: >
cmake --preset ${{ matrix.preset }}
-DCPM_SOURCE_CACHE=${{ env.cpm-path }}
-DZLIB_ENABLE_LFS=${{ matrix.lfs }}
- name: Build
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }}
Expand All @@ -100,14 +96,13 @@ jobs:
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install

build-bsd:
name: ${{ matrix.preset }}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.lfs }}
name: ${{ matrix.preset }}-${{ matrix.arch }}-${{ matrix.config }}
strategy:
fail-fast: false
matrix:
preset: [freebsd, netbsd, openbsd]
arch: [arm64, x86_64]
config: [Debug, Release]
lfs: [OFF, ON]
exclude:
- { preset: netbsd, arch: arm64 }
include:
Expand All @@ -133,7 +128,6 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
-DCPM_SOURCE_CACHE=${{ env.cpm-path }} \
-DZLIB_ENABLE_LFS=${{ matrix.lfs }} \
-DZLIB_INSTALL=ON \
-DZLIB_TEST=ON
cmake --build build
Expand All @@ -143,13 +137,12 @@ jobs:
cmake --install build
build-msys2:
name: msys2-${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.lfs }}
name: msys2-${{ matrix.preset }}-${{ matrix.config }}
strategy:
fail-fast: false
matrix:
preset: [mingw64, mingw32, ucrt64, clang64]
config: [Debug, Release]
lfs: [OFF, ON]
include:
- { preset: mingw64, env: x86_64 }
- { preset: mingw32, env: i686 }
Expand Down Expand Up @@ -181,7 +174,6 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-DCPM_SOURCE_CACHE=${{ env.cpm-path }}
-DZLIB_ENABLE_LFS=${{ matrix.lfs }}
-DZLIB_INSTALL=ON
-DZLIB_TEST=ON
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ include(cmake/GetCPM.cmake)
include(cmake/UseSanitizer.cmake)

# Custom options
option(ZLIB_ENABLE_LFS "Enable Large-File Support (LFS) on 32-bit system" OFF)
option(ZLIB_INSTALL "Install zlib and CMake targets" OFF)
option(ZLIB_TEST "Enable testing and build tests" OFF)

Expand Down Expand Up @@ -130,13 +129,6 @@ if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_definitions(ZLIB PUBLIC ZLIB_DLL)
endif()

if(ZLIB_ENABLE_LFS)
target_compile_definitions(ZLIB PUBLIC
_LARGEFILE64_SOURCE
_FILE_OFFSET_BITS=64
)
endif()

# Install zlib
if(ZLIB_INSTALL)
include(CMakePackageConfigHelpers)
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ Build [zlib](https://github.com/madler/zlib) using modern CMake and override the

## CMake Options

| Option | Default | Description |
| ----------------- | ------- | ------------------------------------------------ |
| `ZLIB_ENABLE_LFS` | `OFF` | Enable Large-File Support (LFS) on 32-bit system |
| `ZLIB_INSTALL` | `OFF` | Install zlib and CMake targets |
| `ZLIB_TEST` | `OFF` | Enable testing and build tests |
| Option | Default | Description |
| -------------- | ------- | ------------------------------ |
| `ZLIB_INSTALL` | `OFF` | Install zlib and CMake targets |
| `ZLIB_TEST` | `OFF` | Enable testing and build tests |

- `CPM_SOURCE_CACHE`
- Set to `/path/to/cache` to reuse downloaded source code
Expand Down

0 comments on commit 7eafb4f

Please sign in to comment.