-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use find_package instead of adding include directories 1 by 1 #4309
Conversation
@open-telemetry/cpp-approvers please take a look. I will see to find some time the next days to verify as well that this works |
I tried it out but ran into the following:
|
Quick note for improvement: It should be mentioned somewhere in the I started the
The error was fixed with
|
Another possible improvement: Should explicitly say if that file is created in the |
@svrnm this should be working now. ricardo:~/cncf/otel-cpp-starter/roll-dice/build
$ cmake ..
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found opentelemetry-cpp: /usr/local/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ricardo/cncf/otel-cpp-starter/roll-dice/build |
If I remember correctly there was a cmake flag that allows you to disable tests and by that remove the requirement for those additional libraries (
This should be created in the roll-dice folder, if this is not clear from the current wording, please update.
The goal was to have dependencies not globally installed, because people might want to work through the tutorial, try things out and then delete everything without having any remains in their system. (I also saw that there is a sudo make install for oatpp, this should not be there and is also not required) For the updated CMakeList I get a different error now:
I assume this is related to the fact that I build with abseil (see the note in the documentation for that), since I can not get it built with the non-abseil functions |
Thanks @svrnm! Question: regarding using the Help request: For the linking, I believe we will need someone from sig:cpp to propose another way instead of |
Yes, that would be my preferred solution |
@svrnm I think all the changes are good now. |
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.
LGTM
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.
LGTM, thanks for the cleanup.
Hi @ricardoamaro. Thanks for the PR, it looks good from the opentelemetry-cpp maintainers point of view. Ok to merge. |
@marcalff I don't have authorization to merge. Can someone, who has that it please merge? |
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.
Please take a look at my requested changes. Verify that neither oatpp nur opentelemetry are installed in any global locations and the cmake is picking them up from there.
Apparently, minimum required cmake version just got updated to 3.25 in oatpp/oatpp@0623281 |
I suspect that maybe this last version of
|
Also fixed this warning:
|
All warnings and errors fixed:
|
thanks @ricardoamaro! I will give it another look within the next few days and if all goes well we should be able to merge this soon! |
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.
please take a look at my comments.
I struggle to build the sample app myself right now, but it feels like it is an issue on my end
Co-authored-by: Severin Neumann <[email protected]>
thank you for working through this @ricardoamaro ! |
Use find_package instead of adding include directories 1 by 1
Fixes #3974