-
Notifications
You must be signed in to change notification settings - Fork 172
Cmake install config files #176
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
base: master
Are you sure you want to change the base?
Cmake install config files #176
Conversation
|
The only thing I don't like about this MR is getting the version based on the tag. In this case, the extracted version would be 0.1.0, which is a relatively old version. It may not appeal to you |
|
@nmwsharp Answering to your comment at #206 (comment)
Also tagging @aschier |
|
What I usually include is:
More Information can be found in the modern cmake guide, e.g. on exported targets @hollowsunhc I wonder what get_project_version_from_git does when it is no git checkout? Can it have a fallback? One can also use something like It is also useful to deactivate optional features automatically on a missing dependency and output a warning for more important features. I'd have to look what's optional here, but I think some libraries like SuiteSparse can sometimes be hard to setup (many numeric libraries are annoying to use with Windows) and if one needs a feature that does not depend on it, it is nice to be able to skip it. |
Good point! If you try to compile a source .zip, you will probably get a status message and all the variables will be undefined. In that case, it is probably better to hard code the version in the sources. My favorite way of versioning is through a regex that also captures the commit. That way, a dev build will have a version looking like:
The SuiteSparse I'm compiling on Windows is the following: https://github.com/DrTimothyAldenDavis/SuiteSparse but I agree that you may want to have it turned off for licensing issues or if in a pre-optimization phase. In that case, if you compile with suitesparse turned off, |
|
I currently can't test Windows builds, but optional libraries being autodetected is good on the nice-to-have list even when no priority. I think the exported targets are the most important point here. |
Closes #175 (comment)
Depends on #174