You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.
Rocky Linux 8, cmake version 3.27.7
Steps to reproduce
Create a cmake project (/myproject) that adds opentelemetry-cpp as a subdirectory, either with add_subdirectory or FetchContent_MakeAvailable
Add opentelemetry_opentracing_shim as a link to a local target in your project
Try to build your local target
What is the expected behavior?
I expect that the opentelemetry_opentracing_shim include paths point to the location of the third_party/opentracing-cpp header files
What is the actual behavior?
The include paths are relative to my local project's root, not the opentelemetry-cpp root. That is, I see paths like /myproject/third_party/opentracing-cpp/include instead of /myproject/opentelemetry-cpp/third_party/opentracing-cpp/include. This causes errors about missing headers.
Additional context
The root cause appears to be in opentracing-shim/CMakeLists.txt. It is added some include dirs to the shim target, but they are relative to CMAKE_BINARY_DIR/CMAKE_SORUCE_DIR. This works when opentelemetry-cpp is the top-level project, but in this case myproject is at the top-level, so these paths are no longer correct. I think making these paths relative to PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR would be better since the paths would always be constructed relative to the actual opentelemetry-cpp directory.
The text was updated successfully, but these errors were encountered:
Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.
Rocky Linux 8, cmake version 3.27.7
Steps to reproduce
/myproject
) that adds opentelemetry-cpp as a subdirectory, either with add_subdirectory or FetchContent_MakeAvailableWhat is the expected behavior?
I expect that the opentelemetry_opentracing_shim include paths point to the location of the third_party/opentracing-cpp header files
What is the actual behavior?
The include paths are relative to my local project's root, not the opentelemetry-cpp root. That is, I see paths like
/myproject/third_party/opentracing-cpp/include
instead of/myproject/opentelemetry-cpp/third_party/opentracing-cpp/include
. This causes errors about missing headers.Additional context
The root cause appears to be in
opentracing-shim/CMakeLists.txt
. It is added some include dirs to the shim target, but they are relative to CMAKE_BINARY_DIR/CMAKE_SORUCE_DIR. This works when opentelemetry-cpp is the top-level project, but in this casemyproject
is at the top-level, so these paths are no longer correct. I think making these paths relative to PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR would be better since the paths would always be constructed relative to the actual opentelemetry-cpp directory.The text was updated successfully, but these errors were encountered: