-
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
[question] Using layout and -of together Conan 2 #647
Comments
Hi @forry Thanks for your question. It seems the There might be a couple of possible approaches to this:
I am moving this ticket to the |
Thanks for your response.
That is what I'm experimenting with. But trying to understand the process - does it work that it concatenates the --output-folder with the layout build_folder? Meaning from
Ok, assuming the above, I have removed the So my assumption: to make the |
No, it doesn't overwrite. The
Yes, I think this is more or less how it was designed. Using the The improvement I was thinking of when I moved the ticket to this repo is try to drop the |
Maybe it could be handled by the same thing as finding a CMakeDeps in the conanfile: But I think that the approach of using the So thinking next when I would drive the configuration and build by conan. The |
Hi,
while using conan 2.4.1 on Windows 10 I want to make a conan 2 recipe for an application using cmake. I want to use the conan-cmake deps provider (supplied as a top-level include via our cmake preset through the GUI) and make it possible to drive the build process either from cmake or conan. The problem I'm encountering is when the layout is defined in some way but the conan dependency provider (or user) runs
conan install
with the-of
argument.I like to use out-of-source builds so I define my layout like this:
But the user building it will start the cmake-gui with the binary dir of his choosing.
When called the
conan install .
it creates a folderbuild
with subfoldergenerators
with the files, which is great.When called
conan install . -of ../build
the result is the same -build/generators
.But when called like
conan install . -of ../build/conan
which is what deps provider does when doing cmake configure the result isbuild\build\generators
- one subfolder more than I would like to and noconan
subfolder why?When I comment out the
layout(self)
method and callconan install . -of ../build/conan
the result is justbuild/conan
.If I would like to consistently generate the generator files by conan, let's say in a
<build folder>\conan
, where the<build folder>
is either selected by the user through CMAKE_BINARY_DIR var or by typingconan install.
in a source folder, what should I do?Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: