fix(cmake): do not disable feature if option GOOGLE_CLOUD_CPP_ENABLE_* does not exist
#15820
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GOOGLE_CLOUD_CPP_ENABLEfeatures which do not have a correspondingGOOGLE_CPP_CPP_ENABLE_<name>feature are getting filtered out wrongfully.Indeed,
google_cloud_cpp_enable_cleanupwill disable a feature whenNOT "${${feature_flag}}".This statement will be
truein two cases:GOOGLE_CPP_CPP_ENABLE_<name>is explicitly disabled (which is the intended behavior)GOOGLE_CPP_CPP_ENABLE_<name>does not exist (unintended)Indeed, this leads to
universe_domainbeing filtered out asGOOGLE_CPP_CPP_ENABLE_UNIVERSE_DOMAINwas not declared ingoogle_cloud_cpp_define_legacy_feature_options.This PR fixes the
google_cloud_cpp_enable_cleanupbehavior by disabling a feature when bothDEFINED "${${feature_flag}}"andNOT "${${feature_flag}}".Another alternative would be to declare
GOOGLE_CPP_CPP_ENABLE_UNIVERSE_DOMAIN, but I understood that these options were "legacy" and that their usage is discouraged.