Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake-remake #1027

Open
wants to merge 49 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
31e17ef
added options for shared and static build
Nov 30, 2024
94f1374
switch to use GNUInstallDirs
Nov 30, 2024
66e6844
install libs with static and debug suffix
Nov 30, 2024
116ad2d
add pdb install, fully superseeds #976
Nov 30, 2024
2cfba4d
bump min version again as cmake complains if it's < 3.5
Dec 1, 2024
25e7113
move versionscript block to zlib definition
Dec 1, 2024
cbd0257
set version in project call and use the vars set by it
Dec 1, 2024
37f5f16
renamed examples and tests for not be confused when chainbuilding
Dec 1, 2024
5b1dbeb
remove unneeded renaming for intree builds and the option for it
Dec 1, 2024
c6b9b63
remove checks for sys/types.h, stdint.h and stddef.h as this is done …
Dec 1, 2024
7e7ff50
remove doubled include directories
Dec 1, 2024
4b6b1c1
move compile_definitions to the targets
Dec 1, 2024
aad839e
use the same definition we checked with for off64_t and move to targe…
Dec 1, 2024
4900299
let cmake handle zlib1.rc
Dec 1, 2024
b8eacab
there are no loose loops
Dec 1, 2024
f2a416e
consistent formatting fix
Dec 1, 2024
5a22833
one install option is enough, everything else can be choosen with com…
Dec 1, 2024
d19fc12
the examples are only build to run the tests, so the option should re…
Dec 1, 2024
537ff61
moved versionsetting for cygwin into set_target_properties to not sca…
Dec 1, 2024
969ccfa
use CMAKE_DEBUG_SUFFIX to reduce lines
Dec 2, 2024
cb18a86
add zlib1.rc to cygwin build
Dec 2, 2024
4a7de67
add INSTALL_INTERFACE for proper export
Dec 2, 2024
946f565
add aliases to match the exportnames and use them
Dec 2, 2024
115f2b7
warn if no build-type is selected
Dec 3, 2024
cd0d8b4
proper export
Dec 3, 2024
dd60bc5
install can put different files into different locations
Dec 3, 2024
b6b3494
add test for usage with find_package
Dec 3, 2024
8bb8b91
added more tests
Dec 4, 2024
3a38a9e
set platform and config right for the tests
Dec 5, 2024
1167e50
added version to the expoted config
Dec 5, 2024
73fb8cc
pass also CC and CFLAGS to the tests
Dec 5, 2024
d2af544
ZLIB_BUILD_EXMAPLES is no valid option anymore
Dec 5, 2024
ed0c94e
cygwin renames the shared to cygz.dll
Dec 5, 2024
f842b90
compat copy for mingw
Dec 5, 2024
bf99e64
test mingw and cygwin disabled
Dec 5, 2024
329ce32
also test static
Dec 5, 2024
d77537c
adapt pkgconfig-file to GnuInstallDirs layout
Dec 5, 2024
80cab8c
silence deprecation warning on the action runners
Dec 5, 2024
ee3db17
add option for z-prefix
Dec 7, 2024
48e4563
create zconf.h from zconf.h.in
Dec 7, 2024
55c5924
zconf.h is always created by cmake and configure
Dec 7, 2024
16c8eb7
use unset for clearing a var
Dec 11, 2024
5276397
detect visibility in MSVC better
Dec 11, 2024
763a995
type in define
Dec 11, 2024
149c46d
use the right version
Dec 11, 2024
60edba8
switch to clearer signature of add_test
Dec 11, 2024
341239a
testname shortening
Dec 11, 2024
2009fc5
fix parrallel testing
Dec 11, 2024
cb47dd8
add minizip
Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c-std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Generate project files (cmake)
if: matrix.builder == 'cmake'
run: |
cmake -S . -B . -D CMAKE_BUILD_TYPE=Release -D ZLIB_BUILD_EXAMPLES=OFF ${{ matrix.os.cmake-opt }}
cmake -S . -B . -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }}
env:
CC: ${{ matrix.compiler }}
CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra
Expand Down Expand Up @@ -205,4 +205,4 @@ jobs:
run: cmake --build . --config Release -v

- name: Run test cases (cmake)
run: ctest -C Release --output-on-failure --max-width 120
run: ctest -C Release --output-on-failure --max-width 120
74 changes: 74 additions & 0 deletions .github/workflows/msys-cygwin.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: mingw/cygwin

on: [push, pull_request]

jobs:
MSys:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys: [mingw32, mingw64, ucrt64, clang64]
name: MSys - ${{ matrix.sys }}
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
make
pacboy: >-
toolchain:p
cmake:p
- name: Configure
run: |
cmake -G"Unix Makefiles" \
-S . \
-B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config Release
- name: Run tests
run: ctest --output-on-failure --test-dir build -C Release

cygwin:
strategy:
fail-fast: false
runs-on: windows-latest
defaults:
run:
shell: C:\cygwin\bin\bash.exe --login -o igncr '{0}'
name: Cygwin
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: >-
cmake
cygwin-devel
gcc-core
gcc-g++
ninja
- name: Configure
run: |
cmake /cygdrive/d/a/zlib/zlib \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
- name: Build
run: cmake --build build --config Release
- name: Run tests
run: ctest --output-on-failure --test-dir build -C Release
Loading