Skip to content

Fix CMake warning about mis-matching arguments - #1271

Open
bostick wants to merge 1 commit into
madler:developfrom
bostick:fix-cmake-warning-mis-matching-arguments
Open

Fix CMake warning about mis-matching arguments#1271
bostick wants to merge 1 commit into
madler:developfrom
bostick:fix-cmake-warning-mis-matching-arguments

Conversation

@bostick

@bostick bostick commented Jun 20, 2026

Copy link
Copy Markdown

When running the zlib tests, I get this CMake warning:

8: CMake Warning (dev) in CMakeLists.txt:
8:   A logical block opening on the line
8: 
8:     /Users/brenton/development/github/tbt-parser/build/_deps/zlib-build/test/zlib_add_subdirectory_test/CMakeLists.txt:23 (if)
8: 
8:   closes on the line
8: 
8:     /Users/brenton/development/github/tbt-parser/build/_deps/zlib-build/test/zlib_add_subdirectory_test/CMakeLists.txt:27 (endif)
8: 
8:   with mis-matching arguments.
8: This warning is for project developers.  Use -Wno-dev to suppress it.

This is because zlib is doing:

if(ZLIB_BUILD_STATIC)
...
endif(@ZLIB_BUILD_STATIC)

instead of doing:

if(ZLIB_BUILD_STATIC)
...
endif(ZLIB_BUILD_STATIC)

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.

1 participant