Skip to content

cmake: add CURL_ENABLE_SSL option#7822

Closed
nightlark wants to merge 3 commits intocurl:masterfrom
nightlark:add-enable-ssl-option
Closed

cmake: add CURL_ENABLE_SSL option#7822
nightlark wants to merge 3 commits intocurl:masterfrom
nightlark:add-enable-ssl-option

Conversation

@nightlark
Copy link
Contributor

@nightlark nightlark commented Oct 6, 2021

I came across a project building libcurl as a subproject that was trying to set SSL_ENABLED to OFF to disable SSL support in libcurl. Other than SSL_ENABLED being set as a local variable in libcurl and basically overriding anything that they might have set in the cache, issues would have also been encountered because CMAKE_USE_OPENSSL defaults to ON.

I think adding an ENABLE_SSL option (maybe renamed to match any curl cmake option naming convention) that the various SSL backends also depend on would make it much easier for projects building libcurl as a subproject to disable ssl without needing to determine which CMAKE_USE_* variables for SSL backends are set, and more obvious what option needs to be turned ON/OFF.

By ENABLE_SSL defaulting to ON, the behavior of existing SSL related options should remain the same and avoid breaking any existing ci setups or build scripts.

Thoughts?

@bagder bagder added the cmake label Oct 6, 2021
@jzakrzewski
Copy link
Contributor

Please namespace the option. ENABLE_SSL is in my opinion too generic and may cause clashes with other projects. I myself have for example included MongoDB driver and curl in the same project and that alone would cause problems with this change.

@nightlark nightlark force-pushed the add-enable-ssl-option branch from 2ad673c to 3eb97df Compare October 7, 2021 14:49
@nightlark nightlark changed the title cmake: add ENABLE_SSL option cmake: add CURL_ENABLE_SSL option Oct 7, 2021
@nightlark
Copy link
Contributor Author

Option name is now under the CURL_ namespace.

@jzakrzewski
Copy link
Contributor

No time to test but at least looks sensible ;)

@bagder bagder requested a review from MarcelRaad October 14, 2021 09:39
@MarcelRaad
Copy link
Member

The test failures look unrelated.

@MarcelRaad
Copy link
Member

Merged now. Thank you!

@nightlark nightlark deleted the add-enable-ssl-option branch October 16, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants