-
Notifications
You must be signed in to change notification settings - Fork 247
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
how to implement conan_cmake_configure in conan 2.0 #557
Comments
Moving this to the cmake-conan repo, as this is not a Conan question, but related to cmake-conan |
Thanks for your question @laxmij-cmd
In Conan 2.0 integration we have moved to a more explicit approach, that works better in many cases, and that implements a fully transparent integration, that is, it is not necessary to modify at all your
|
Are there any plans to allow old workflow? Maybe add some additional separate functions that will create temporary conanfile.py from input parameters and call conan install. |
No there are no plans for this. Because that means having CMakeLists.txt to basically generate a file(WRITE conanfile.txt "[requires]\nzlib/1.2.13") in your CMakeLists.txt, no need anymore to use an invented helper to just write that file to disk, while cluttering the The call to |
My workflow was also centered around A common pattern in larger CMake projects is to define Conditionally adding |
To use cmake-conan, -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/conan_provider.cmake is needed to be passed along in cmake command. |
I must say I agree, it would be nice that you can contain all logic in a cmakelists.txt file instead of moving it outside. For example, we use conan for "desktop" dependencies, and the same project can be compiled as "embedded", depending on a cmake option(). In that embedded case we have a yocto toolchain with all required dependencies for which we don't need to use conan. So now people will need to remember that if they open it for desktop that they should give a specific commandline parameter. |
Sure, the modern CMake recommended (by CMake) way to achieve this is using |
ok thanks for the pointer to cmake presets, did not know it 👍 |
What is your question?
Hi,
I have to start using conan 2.0. In conan 1.x, I am using conan_cmake_configure to generate conanfile.txt . How can I achieve this in conan2.0
Best Regards
Laxmi
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: