[CMAKE] Set the project version through the cmake project macro#3605
Merged
marcalff merged 4 commits intoopen-telemetry:mainfrom Aug 27, 2025
Merged
[CMAKE] Set the project version through the cmake project macro#3605marcalff merged 4 commits intoopen-telemetry:mainfrom
marcalff merged 4 commits intoopen-telemetry:mainfrom
Conversation
…ndard config mode to find the project in the config.cmake file. Set cached variables for the version and abi number for in-tree builds with fetch content. Test the cached varaibles are set properly in ci
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
dbarker
commented
Aug 22, 2025
dbarker
commented
Aug 22, 2025
dbarker
commented
Aug 22, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3605 +/- ##
=======================================
Coverage 90.03% 90.03%
=======================================
Files 220 220
Lines 7069 7069
=======================================
Hits 6364 6364
Misses 705 705 🚀 New features to boost your workflow:
|
3 tasks
marcalff
reviewed
Aug 27, 2025
marcalff
reviewed
Aug 27, 2025
Member
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the fix.
See comments, with some simplifications.
…explicitly. Add support to set a version suffix string
ThomsonTan
reviewed
Aug 27, 2025
marcalff
reviewed
Aug 27, 2025
lalitb
approved these changes
Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cmake
projectmacro takesVERSIONandLANGUAGEargs which are not currently being set in otel-cppCMakeLists.txt.CMake uses the
VERSIONarg to set internal variables (See https://cmake.org/cmake/help/v3.31/command/project.html#options) which are used by CMake. One example is for providing more info to the user when they callfind_package(opentelemetry-cpp CONFIG).Previous cmake message when calling
find_package(opentelemetry-cpp CONFIG)New cmake message when calling
find_package(opentelemetry-cpp CONFIG)Changes
OPENTELEMETRY_VERSIONandOPENTELEMETRY_ABI_VERSION_NOvariables tocmake/version.cmakeVERSIONandLANGUAGEargs inproject(opentelemetry-cpp ...)OPENTELEMETRY_VERSIONandOPENTELEMETRY_ABI_VERSION_NOas cached variables so users building otel-cpp in-tree with their project can know what version and abi number has been built.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes