Skip to content

Conversation

@woodfell
Copy link
Contributor

In some places internal cmake variables are being set manually, either on the command line or from a higher level project. Setting project_BUILD_${feat} vars breaks the internal feature enable/disable logic and must not be allowed. Projects can TEST project_BUILD_${feat} to decide whether to build something or not, for example unit tests, but they must never be set manually. The correct way is to set project_ENABLE_${feat} instead.

This does not fix any place which actually does this, just ensure that an error is thrown if someone uses these options erroneously.

@woodfell woodfell force-pushed the woodfell/protect_option_build_variables branch from a31ba49 to 8b9c1da Compare September 11, 2019 01:44
@benjaminaltieri
Copy link
Contributor

This only projects against setting these variables in the commandline or parent project right? Are there also cases where these are being set within the project itself after Swift options is called?

@woodfell
Copy link
Contributor Author

They could be overwritten later on, but there is nothing we can really do about that. I keep coming across cases of BUILD_* being set from a higher level project, or in a Jenkinsfile, that is the behaviour which really needs to be protected against.

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.

2 participants