[CMAKE] update cmake files in examples directory#3421
Merged
marcalff merged 4 commits intoopen-telemetry:mainfrom May 19, 2025
Merged
[CMAKE] update cmake files in examples directory#3421marcalff merged 4 commits intoopen-telemetry:mainfrom
marcalff merged 4 commits intoopen-telemetry:mainfrom
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3421 +/- ##
==========================================
+ Coverage 90.04% 90.05% +0.02%
==========================================
Files 212 212
Lines 6932 6932
==========================================
+ Hits 6241 6242 +1
+ Misses 691 690 -1 🚀 New features to boost your workflow:
|
…arget. Update the dll component install test to rely on the tranisitive include directories.
owent
approved these changes
May 19, 2025
Member
There was a problem hiding this comment.
LGTM.
BTW: Not a problem of this PR, but should OPENTELEMETRY_BUILD_IMPORT_DLL be interface definition of opentelemetry_cpp in ext/src/dll/CMakeLists.txt)? @ThomsonTan
Contributor
Yes, I think this is good suggestion. Opened below issue for tracking. |
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.
Fixes #3399
Updates the examples' cmake files to use the read-only ALIAS targets of
opentelemetry-cppadded by #3368 and to use explicitly scoped target properties.Changes
opentelemetry-cppALIAS targets (ie:opentelemetry-cpp::apiin place ofopentelemetry_api)target_compile_definitionsin place ofadd_definitionstarget_include_directoriesin place ofinclude_directoriesPRIVATE,PUBLIC) totarget_link_librariesPUBLICtarget properties (definitions, linked libraries, include directories)CMAKE_THREAD_LIBS_INITwith theThreads::Threadstarget where needed, otherwise remove it and rely on theopentelemetry-cpp::commontarget's public transitive link to Threads.opentelemetry-cpp::opentelemetry_cpp) to include the directories for headers it depends on. Update theext_dllcomponent install test to verify.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes