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: doesn't fail if zlib support is requested but the zlib library can't be found #6173
Comments
I don't think we need to "blindly" follow and mimic autotools in cmake (as it certainly has its flaws and peculiarities as well), but the things that are done "right" and that we like we certainly could. I think when a user asks for enabling a feature, like zlib, we should fail if that can't be done - using any build system. If the user doesn't ask for it, then detecting it automatically and using it or not based on that seems reasonable. Right? |
I'm with @bagder . CMake build should probably behave "the CMake way" mimicking autotools where it makes sense. |
@jzakrzewski I'm also not arguing. Then we should re-write all CMake build to new rules. |
It's good enough if we keep fixing things, one by one. Just like we always have! |
Running
cmake -DCURL_ZLIB:BOOL=ON
succeeds even iffind_package(ZLIB)
fails.In general the checks are inconsistent. With
find_package(Brotli QUIET)
(https://github.com/curl/curl/blob/master/CMakeLists.txt#L653) immediately followed byfind_package(Zstd REQUIRED)
(https://github.com/curl/curl/blob/master/CMakeLists.txt#L665).On autotools you have --with-zlib/--without-zlib and autodetection. If
--with-zlib
is used the configure script fails if the zlib library can't be found.The text was updated successfully, but these errors were encountered: