Skip to content
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: When adding options, prefix with "Z3_" #2709

Closed
asmaloney opened this issue Nov 17, 2019 · 3 comments
Closed

CMake: When adding options, prefix with "Z3_" #2709

asmaloney opened this issue Nov 17, 2019 · 3 comments

Comments

@asmaloney
Copy link

If you use library like this as a submodule in another project, it is very useful to have its options prefixed by the project name. Otherwise you end up with options sprinkled throughout the cmake interface and it's not obvious which project they are for.

e.g. API_LOG_SYNC, BUILD_DOTNET_BINDINGS, ENABLE_TRACING_FOR_NON_DEBUG, INCLUDE_GIT_DESCRIBE, etc..

This gets worse as you include more external libraries in your project. You can also end up with option name collisions.

As a bonus when adding a prefix, the graphical interface to cmake will group options together under the first "word" (up to the first ""). So if they are all prefixed by "Z3" they get grouped and it's much easier to manage.

@NikolajBjorner
Copy link
Contributor

could you add pull request?

NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
@NikolajBjorner
Copy link
Contributor

suggestion seems to make sense, but implementing it will almost for sure break things.
Pointing out problems as part of this issue will be appreciated

NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
NikolajBjorner added a commit that referenced this issue Nov 19, 2019
@asmaloney
Copy link
Author

These changes are great Nikolaj - thank you!

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

No branches or pull requests

2 participants