-
Notifications
You must be signed in to change notification settings - Fork 252
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
[suggest][dev2] Run conan install and include conan_toolchain.cmake directly when injection. #480
Comments
Hi @hwhsu1231 I am afraid that what you are suggesting is not possible:
You need the full CMake definition of compiler to be able to obtain it and use it for |
If that is the case, I feel like we might have reached a deadlock with Dependecny Provider. Any other ideas? |
No we havent, this is good. This can work by guaranteeing an alignment between the configuration and what would be generated by the The plan is now to test it, experiment with it and get feedback, and lets see how it goes. So far it seems it has good potential. |
What do you mean? Do you mean that we won't need CMakeToolchain anymore in the future? |
It is definitely needed for building packages, because the cmake-conan integration is only for pure consumers, but cannot and will never be used to create packages. It will also be very relevant in many other situations and contexts. The vast majority of Conan users are not using the |
So you mean that CMakeToolchain is:
Therefore, it's fine to use just CMakeDeps with cmake-conan in most cases, right? |
Suggestion
According to #475 (comment)
Since the
conan install
command is executed in theconan_provide_dependency()
function, theconan_toolchain.cmake
file of CMakeToolchain will be generated only when thefind_package()
command is called, which is after theproject()
command. Therefore, the CAE problem cannot be solved.However, I suddenly thought of an idea:
conan install
and includeconan_toolchain.cmake
directly when injection.${CONAN_GENERATORS_FOLDER}
intoCMAKE_PREFIX_PATH
insideconan_provide_dependency()
.In other words:
Maybe the CAE problem can be solved in this way?
The text was updated successfully, but these errors were encountered: