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

Manage project version with cmake #2835

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

K20shores
Copy link
Contributor

This PR defines the version in the cmake project call. CMake will automatically parse the major, minor, and patch versions.

The version option defines a set of variables useable in the project, including configured files. For example, the major version is available using a mix of the project name (netCDF) and the part of the version you want: netCDF_VERSION_MAJOR

@CLAassistant
Copy link

CLAassistant commented Jan 5, 2024

CLA assistant check
All committers have signed the CLA.

@WardF
Copy link
Member

WardF commented Jan 5, 2024

Thanks @K20shores! There's a CLA button to click, too, that enables things on our end. It's an organizational thing, but clearly not across the entire organization XD.

@WardF WardF self-assigned this Jan 5, 2024
@WardF WardF added this to the 4.9.3 milestone Jan 5, 2024
Copy link
Member

@WardF WardF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update configure.ac to change the variable name for consistency? As it stands, configure-based builds will fail to properly generate netcdf_meta.h since it will create NC_VERSION_x variables.

@K20shores
Copy link
Contributor Author

@WardF I made that change. Again, if you'd prefer, I can use the variables that cmake sets to recreate the NC_* version variables; I figured that it's probably at least a little better to put the version in the project command so that cmake has the version information which can affect downstream projects.

@WardF
Copy link
Member

WardF commented Jan 8, 2024

Looks good @K20shores, thanks!

@WardF WardF merged commit 5ad890c into Unidata:main Jan 8, 2024
99 checks passed
@K20shores K20shores deleted the versioning_with_cmake branch March 22, 2024 18:04
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.

3 participants