-
Notifications
You must be signed in to change notification settings - Fork 440
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
cmake: add Find<package>.cmake find module method for thrift #1020
Conversation
exporters/jaeger/CMakeLists.txt
Outdated
@@ -32,7 +32,7 @@ target_include_directories( | |||
target_link_libraries( | |||
opentelemetry_exporter_jaeger_trace | |||
PUBLIC opentelemetry_resources http_client_curl | |||
PRIVATE thrift::thrift) | |||
INTERFACE thrift::thrift) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is necessary to change the dependency to INTERFACE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still in testing phase, not seems to be a problem for now, I have removed this change, thanks!
Codecov Report
@@ Coverage Diff @@
## main #1020 +/- ##
=======================================
Coverage 94.85% 94.85%
=======================================
Files 151 151
Lines 5972 5972
=======================================
Hits 5664 5664
Misses 308 308 |
In some cases, when using jaeger-cpp-client, we use thrift provided from distro packages, these does not contain thriftConfig.cmake. For such scenarios, we pivot to do not make find_package CONFIG mode as default, instead we use basic signature[0]. We make use of `CMAKE_MODULE_PATH` to search for FindThrift.cmake, which will find and set all thrift::thrift's target properties. This appends cmake/modules dir to CMAKE_MODULE_PATH, which is used as all modules requiring find_package mode with basic_signature. [0] https://cmake.org/cmake/help/latest/command/find_package.html The command arguments determine which of the above modes is used. When the basic signature is used, the command searches in Module mode first. If the package is not found, the search falls back to Config mode. Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
Out of curiosity, which are these distributions providing thrift package without cmake config files? |
Sure, I can help there, I think most does, you can check them here: https://pkgs.org/search/?q=thrift |
We were using git fetch and an unofficial remote to fetch opentelemetry-cpp, as it needed additional patch to include boost headers, with the merge of open-telemetry/opentelemetry-cpp#1100 open-telemetry/opentelemetry-cpp#1020 we do not require to maintain our own patched version. This removes compile time fetch for opentelemetry-cpp instead use official opentelemetry-cpp lib as a submodule. Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
We were using git fetch and an unofficial remote to fetch opentelemetry-cpp, as it needed additional patch to include boost headers, with the merge of open-telemetry/opentelemetry-cpp#1100 open-telemetry/opentelemetry-cpp#1020 we do not require to maintain our own patched version. Also, we were using git fetch as a temporary change, now that tracing is always on, it should be right time to adapt to using opentelemetry-cpp as a submodule. This removes compile time fetch for opentelemetry-cpp instead use official opentelemetry-cpp lib as a submodule. Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
We were using git fetch and an unofficial remote to fetch opentelemetry-cpp, as it needed additional patch to include boost headers, with the merge of open-telemetry/opentelemetry-cpp#1100 open-telemetry/opentelemetry-cpp#1020 we do not require to maintain our own patched version. Also, we were using git fetch as a temporary change, now that tracing is always on, it should be right time to adapt to using opentelemetry-cpp as a submodule. This removes compile time fetch for opentelemetry-cpp instead use official opentelemetry-cpp lib as a submodule. Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
We were using git fetch and an unofficial remote to fetch opentelemetry-cpp, as it needed additional patch to include boost headers, with the merge of open-telemetry/opentelemetry-cpp#1100 open-telemetry/opentelemetry-cpp#1020 we do not require to maintain our own patched version. Also, we were using git fetch as a temporary change, now that tracing is always on, it should be right time to adapt to using opentelemetry-cpp as a submodule. This removes compile time fetch for opentelemetry-cpp instead use official opentelemetry-cpp lib as a submodule. Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
In some cases, when using jaeger-cpp-client, we use thrift provided from
distro packages, these does not contain thriftConfig.cmake.
For such scenarios, we pivot to do not make find_package CONFIG mode as
default, instead we use basic signature[0]. We make use of
CMAKE_MODULE_PATH
to search for FindThrift.cmake, which will find andset all thrift::thrift's target properties.
[0] https://cmake.org/cmake/help/latest/command/find_package.html
The command arguments determine which of the above modes is used. When
the basic signature is used, the command searches in Module mode first.
If the package is not found, the search falls back to Config mode.
Signed-off-by: Deepika Upadhyay dupadhya@redhat.com
Fixes # (issue)
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes