Skip to content

Conversation

@sean-parent
Copy link
Member

@sean-parent sean-parent commented Dec 19, 2025

Introduces the cpp_library_set_version() function to set project version variables from git tags after project() is called, enabling git-based versioning for custom setups. Updates documentation with usage instructions and refactors cpp_library_setup() to use the new function for version management.


Note

Adds cpp_library_set_version for git tag-based project versioning and updates cpp_library_setup to use it; documents usage in README.

  • CMake:
    • Versioning: Introduces cpp_library_set_version() to set PROJECT_VERSION* from git tags (respects CPP_LIBRARY_VERSION, strips v prefix, falls back to 0.0.0).
    • Refactor: cpp_library_setup() now calls cpp_library_set_version() and propagates PROJECT_VERSION* instead of duplicating parsing logic.
  • Docs:
    • Adds API reference, usage examples, and guidance for cpp_library_set_version() in README.md (including stlab example and when-to-use notes).

Written by Cursor Bugbot for commit 49cd94f. This will update automatically on new commits. Configure here.

Introduces the cpp_library_set_version() function to set project version variables from git tags after project() is called, enabling git-based versioning for custom setups. Updates documentation with usage instructions and refactors cpp_library_setup() to use the new function for version management.
Adds backward compatibility by setting PROJECT_VERSION and its components (MAJOR, MINOR, PATCH) in the parent scope within cpp_library_setup.
@sean-parent sean-parent merged commit 2b17454 into main Dec 19, 2025
4 checks passed
@sean-parent sean-parent deleted the sean-parent/untracked-fixes branch December 19, 2025 23:02
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