Fix opentelemetry-proto file exists check#1824
Merged
lalitb merged 3 commits intoDec 1, 2022
Merged
Conversation
marcalff
approved these changes
Nov 30, 2022
Member
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the fix.
The original bug is mine, sorry I must have been distracted when doing last minute changes.
esigo
approved these changes
Nov 30, 2022
ThomsonTan
reviewed
Nov 30, 2022
| # | ||
|
|
||
| if(OTELCPP_PROTO_PATH) | ||
| if(NOT EXISTS(${OTELCPP_PROTO_PATH}/opentelemetry/proto/common/v1/common.proto)) |
Contributor
There was a problem hiding this comment.
@marcalff , do you think we can have a test on this passed in env var?
Member
There was a problem hiding this comment.
Tested locally with:
malff@localhost.localdomain:build-opentelemetry-cpp> pwd
/home/malff/CODE/MY_GITHUB/build-opentelemetry-cpp
ccmake \
-DOTELCPP_PROTO_PATH=/home/malff/CODE/MY_GITHUB/opentelemetry-proto \
-DWITH_OTLP=ON \
-DWITH_OTLP_HTTP=ON \
-DWITH_OTLP_GRPC=ON \
../opentelemetry-cpp \
CMake result without the fix:
CMake Error at cmake/opentelemetry-proto.cmake:30 (message):
OTELCPP_PROTO_PATH does not point to a opentelemetry-proto repository
CMake result with the fix:
opentelemetry-proto dependency satisfied by: external path
So the fix is working.
OTELCPP_PROTO_PATH also shows in the ccmake UI.
@ThomsonTan
Using environment variables will be odd, may be I don't understand what you suggest.
Member
There was a problem hiding this comment.
@ThomsonTan - Hope this is ok to merge. If there are any specific test scenarios, we can address them separately.
yxue
pushed a commit
to yxue/opentelemetry-cpp
that referenced
this pull request
Dec 5, 2022
yxue
pushed a commit
to yxue/opentelemetry-cpp
that referenced
this pull request
Dec 5, 2022
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 #1823
Changes
Fix CMake
EXISTSsyntaxFor significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes