Skip to content

fix(zlib): compile + test cleanly when disabled#54

Merged
szaghi merged 3 commits intoszaghi:masterfrom
flabowski:raw-zlib-ci-fix
Mar 13, 2026
Merged

fix(zlib): compile + test cleanly when disabled#54
szaghi merged 3 commits intoszaghi:masterfrom
flabowski:raw-zlib-ci-fix

Conversation

@flabowski
Copy link
Copy Markdown
Contributor

#53 didn’t compile when zlib is disabled (coverage/zlib-OFF mode): 'compress2' was still referenced while its interface is preprocessed out.
This PR:
Wraps the 'compress2' call in #ifdef VTKFORTRAN_USE_ZLIB.
Makes 'vtk_fortran_write_vtu_zlib' skip when zlib is not enabled (instead of crashing).
I also tried to fix the CI tests, feel free to adapt to match your other repos.

Install zlib dev package on Ubuntu runners and run a second FoBiS build with VTKFORTRAN_USE_ZLIB enabled. Also guard zlib bindings so zlib-off builds don't require linking -lz.
Wrap compress2 call in VTKFORTRAN_USE_ZLIB guard so FoBiS zlib-off mode compiles.
Avoid running the RAW-ZLIB writer when VTKFORTRAN_USE_ZLIB is not defined (coverage mode), preventing runtime errors from continuing after failed initialize.
@szaghi szaghi merged commit 5f66ad0 into szaghi:master Mar 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants