-
Notifications
You must be signed in to change notification settings - Fork 791
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: add TESTING_USE_NETWORK configure option #4220
Conversation
I would rather use ON by default, as packagers' constraints are not necessarily the ones of "regular" PROJ users/developers. If we keep the default to OFF, we should change our CI configurations (at least some of them) to set it to ON to avoid reducing our test coverage. And the option should perhaps be renamed to something like TESTING_USE_NETWORK to limit the risk of confusion with PROJ_NETWORK |
As for default ON/OFF, I'm open for opinions. I'd agree there are likely more that would prefer it to be ON, as PROJ is a web-enabled tool built on CURL. I'll tune the CI options next (tomorrow), just testing to see what happens with changing the defaults. The result of a default OFF is a few CMake configure warnings, and fewer tests, but no failures. For example:
A suggested rename to |
I see the 👍 votes above to keep the default behavior that CMake can use the network during configure and test. Let me know if there are any objections, otherwise I'll re-write this PR using a default (i.e. only users/packagers that do not permit network access would need to specify |
ddf8ea5
to
2a5412a
Compare
2a5412a
to
038fe34
Compare
Some other notes on this PR:
|
This changes how CMake configures a build, where by defaultUSE_NETWORK=OFF
assumes use of the network is not permitted, which disables fetching GTest (if needed) and running network-dependant tests. The user (or packager) would need to opt-in withUSE_NETWORK=ON
to enable these features, which were the default for previous CMake-based PROJ builds.Update: This PR now adds CMake
TESTING_USE_NETWORK
configure option to permit or disable network use, with a default ON to assume the network can be used to fetch GTest dependency (if needed) and run network-dependant tests.This also finally cherry-picks #4153 to document test dependencies, which incorporate new requirements from #4131.
Closes #4219