-
Notifications
You must be signed in to change notification settings - Fork 254
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
find_package issues when migrating to conan 2 #576
Comments
Thanks for your report.
It would be great to have them in Conan too. I see https://github.com/xtensor-stack/xtensor-python is a header-only library, so it should be quite easy to add it to ConanCenter too. Maybe the challenge is if it has dependencies that are not header-only and are challenging to package. |
Hi @memsharded , sorry for the late reply! After investigating my issues with the migration more, I guess my main point is that
I would argue some more explanatory messages around these consecutive find_package statements would help users debug a failing setup. Perhaps an info message like "Attempting to find package PKG_NAME only within conan generators..." ?
are not telling a cohesive story. Particularly, if that exact package is causing trouble when used later. A little off-topic: |
Regarding the NumPy dependency, I have an open PR with a working recipe for it on CCI, if that helps: conan-io/conan-center-index#20283 |
Hi,
inb4: thanks a lot for your work on conan and auto-enabling it with cmake! It is well appreciated.
I am currently migrating a project from conan 1 to conan 2, but running into strange
find_package
problems.TLDR:
The cmake run with Conan2 tells me multiple times that something could not be found, then immediately tells me it was found, and eventually fails nonetheless, because it was not found after all:
Long version:
For conan 1 the project was configured with cmake-conan calling conan from within my cmake call and installing all the deps and providing paths:
I am now attempting to use
cmake-conan
as called from theCLion-Conan
plugin with conan 2. That is theconanfile.py
is default generated and my deps are inconandata.yml
withCMakeDeps
as sole generator and toolchains being created in thegenerate()
method of theconanfile.py
.I am running 2 side-by-side cmake calls, one with conan 1 and another with conan 2, to show the differences in the find_package behaviour. The find-package section of my cmake call is:
Conan 1 cmake log (important bits)
Conan 2 cmake log (important bits)
Please note, some dependencies (
xtensor-python
,xtensor-blas
) are pulled in by the cmake dependency toolCPM
, since they do not have a conan recipe.Where do these duplicate find_package calls come from?
Any advice on how to make the find_package work in conan 2 as well are well appreciated.
The text was updated successfully, but these errors were encountered: