Skip to content
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

logging: Allow to use spdlog from system if present #149

Closed
wants to merge 1 commit into from

Conversation

frantisekz
Copy link
Contributor

Some distributions (like Fedora) disallow fetching content from the internet build-time. Let's allow to link with spdlog from the host and use that if present during the build-time instead of content fetch.

@loqs
Copy link

loqs commented Apr 27, 2024

This fails for me when using the system spdlog as if spdlog_FOUND is set then the system library is not added to the targets link libraries.

@ConiKost
Copy link

ConiKost commented May 8, 2024

I can confirm @loqs, it does not fix the issue for me, which I have reported in #146

@lisanna-dettwyler
Copy link
Contributor

Some distributions (like Fedora) disallow fetching content from the internet build-time. Let's allow to link with spdlog from the host and use that if present during the build-time instead of content fetch.

Would moving from fetchcontent to a submodule make this any better? I presume it would since the submodule would get fetched before build-time.

@loqs
Copy link

loqs commented May 8, 2024

Would moving from fetchcontent to a submodule make this any better? I presume it would since the submodule would get fetched before build-time.

Would you consider moving the fetch and build of spdlog / fmt to a submodule and allowing the use of the system libraries instead?

@lisanna-dettwyler
Copy link
Contributor

Would system libraries be used by default or optionally? What is the use case for using a system spdlog if we're submoduling our own?

@ConiKost
Copy link

ConiKost commented May 8, 2024

As maintainer of level-zero in Gentoo Linux, I can say, that using system libs is a must. We don't allow using 3rd party libs to be included by a package except for some binary only packages. Packages are supposed to be compiled against system libs.

So please allow the usage of such libs. As you can see in #146, the changes are currently reverted as consequence.

Since Gentoo is source based, an optional compile option is fine @lisanna-dettwyler

@LecrisUT
Copy link

LecrisUT commented May 23, 2024

You should bump the cmake_minimum_required. Bumping it to 3.21 will allow you to skip the find_package. The minimum of 3.2 is already broken with the usage of FetchContent.

One thing that's missing for this PR to work is the target_link_libraries (also remove target_include_directories since it doesn't match)

@frantisekz
Copy link
Contributor Author

Replaced by #154 .

@frantisekz frantisekz closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants