-
Notifications
You must be signed in to change notification settings - Fork 945
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
[question] conan install followed by cmake build #8894
Comments
Hi @tiolan You have hit a very interesting case. The good news is that we have been working for this very hard in the last releases, and it is one of our major focus right now:
The Besides that, we are also working heavily in the "layouts" problem, to have things correctly defined for both the local developer flow and when building in the cache with Please have a look to these new features, I think this is what you are looking for. They are still experimental, but the idea is to stabilize them soon so it is possible to use them for a smooth transition to Conan 2.0. |
@memsharded
Also this does not help:
You can see I invoke the build like this: My I tried with conan 1.35.2 and conan 1.36.0 |
Hi @tiolan Does your recipe declare Also it seems you might have a quite old |
@memsharded This actually prints "gcc":
The
(Note that I needed to put some dummy values for So, it should not be an old settings file, right? |
Oh, I see, you are installing a custom That custom Now I see the issue. The new Thanks very much for reporting! |
Hint: If you want to workaround it to keep trying right now, please add manually |
@memsharded
to my settings as a workaround (sun-cc was also required). My conanfile contains this (as a workaround the version is intentionally set to 1.36):
the generated
I am missing, that this toolchain file sets the If building with
|
I am proposing a fix for the issue in #8900 (for 1.36.1 or 1.37, it depends). The set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH}) because it is intended to locate the generated xxxx-config.cmake files created by the Listing the package folders directly and trying to use the scripts within the packages have 2 known limitations:
The |
This comment has been minimized.
This comment has been minimized.
Sorry, please ignore my last (hidden) comment, was my fault. |
#8900 was merged, this will be released in 1.37 |
My question is about using conan with cmake.
I generate a conan package that consists of source code, a CMake project and a conanfile.py. It depends on several other conan packages.
When using
conan create ...
, it pulls the dependencies, compiles the code and everything works fine.Let’s assume I want to further develop the source code e.g. in Visual Studio (Code) without actually building the package.
There I can normally integrate the CMake project directly, that gives me more flexibility and functionality (intellisense, debugger, etc) in the IDE.
My idea was to manually
conan install...
followed by the CMake build instructions (e.g triggered by the IDE).The problem here is that
conan build...
invokes CMake with additional parameter such asCMAKE_MODULE_PATH
that are package specific. They are missing in the normal CMake build.As a workaround I can add these parameters via the IDE such that CMake is invoked properly.
Any idea how to improve this?
I was checking the conan-cmake wrapper.
But failed until now.
The text was updated successfully, but these errors were encountered: