close
Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Use libunwind as an imported target - #368

Merged
sergiud merged 4 commits into
google:masterfrom
UVV-gh:cmake-sdk-fix
Nov 10, 2019
Merged

Use libunwind as an imported target#368
sergiud merged 4 commits into
google:masterfrom
UVV-gh:cmake-sdk-fix

Conversation

@UVV-gh

@UVV-gh UVV-gh commented Oct 8, 2018

Copy link
Copy Markdown
Contributor

When UNWIND_LIBRARY is used directly as a public dependency then
absolute path is stored in cmake config file. This is an issue when
glog is used as part of an SDK, which was built somewhere else. When
SDK is installed on developer's machine, cmake config contains a full
path to non-existent location. The solution is to find libunwind
during configure stage and store target name as a dependency, not a full path

@googlebot

Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@sergiud sergiud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign the CLA first.

Second, please avoid code duplication. The code should be put into a find module which is installed along glog under <prefix>/share/glog/cmake. The package config would then use find_dependency to correctly locate libunwind.

@googlebot

Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

@UVV-gh

UVV-gh commented Oct 9, 2018

Copy link
Copy Markdown
Contributor Author

@sergiud Thanks for the review. Could you please take a look if it looks better now?

@UVV-gh

UVV-gh commented Oct 19, 2018

Copy link
Copy Markdown
Contributor Author

I figured there's still room for improvement here. For example, libunwind is not found in cross-compilation environment. Please hold off for a while

@sergiud sergiud self-assigned this Oct 23, 2018
@UVV-gh

UVV-gh commented Nov 2, 2018

Copy link
Copy Markdown
Contributor Author

Updated. Please take a look again

@UVV-gh
UVV-gh force-pushed the cmake-sdk-fix branch 3 times, most recently from e7e5d51 to 98ec970 Compare November 20, 2018 14:48
@UVV-gh

UVV-gh commented Dec 11, 2018

Copy link
Copy Markdown
Contributor Author

@sergiud I was wondering if you have any other comments/suggestions on this..

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread cmake/FindLibunwind.cmake Outdated
Comment thread glog-config.cmake.in Outdated
Comment thread cmake/FindLibunwind.cmake Outdated
@googlebot googlebot removed the cla: yes label Nov 1, 2019
@google google deleted a comment from googlebot Nov 1, 2019
@googlebot

Copy link
Copy Markdown
Collaborator

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@sergiud

sergiud commented Nov 2, 2019

Copy link
Copy Markdown
Contributor

@googlebot I consent.

@googlebot

Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Nov 2, 2019
When UNWIND_LIBRARY is used directly as a public dependency then
absolute path is stored in cmake config file. This is an issue when
glog is used as part of an SDK, which was built somewhere else. When
SDK is installed on developer's machine, cmake config contains a full
path to non-existent location. The solution is to find libunwind
during configure stage and store target name as a dependency, not a full path.
Cmake module looks for libunwind and libunwind-PLAT, where PLAT is one of
supported platforms.

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
@sergiud
sergiud force-pushed the cmake-sdk-fix branch 5 times, most recently from 683547e to 7df323d Compare November 2, 2019 11:39
@sergiud
sergiud force-pushed the cmake-sdk-fix branch 6 times, most recently from 1ad7317 to 41d80a9 Compare November 10, 2019 14:30
@sergiud
sergiud merged commit 1863b42 into google:master Nov 10, 2019
@sergiud sergiud added this to the 0.5 milestone Apr 13, 2021
@sergiud sergiud mentioned this pull request May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants