-
Notifications
You must be signed in to change notification settings - Fork 259
Description
In the implementation of the conan_install()
function, the conan install
command output is specified to be in JSON format and is captured to a CMake variable. However, the contents of that variable are not made available to the project in any way. One of the really handy uses of that output is to check which packages ended up being built from source instead of retrieving a pre-built binary package from one of the remotes. It can also be used as part of uploading just-built binary packages when one or more dependencies had to be built-on-demand due to missing binary packages.
One potential complication is where multiple calls to conan_install()
are made. Right now, that's the case when a multi-config generator is used. #705 proposed a feature where the project can specify whichever build configuration(s) it wants, including supporting multiple configurations for a single-config generator if they want to. So a feature like what is being proposed here would need some way of saving the results of multiple runs and the project being able to differentiate the separate per-config output.
Perhaps one solution would be to save the output to config-specific files in the output folder. That wouldn't require any new keyword or variable, we could just write these files always. That would certainly help with debugging what's going on with fulfilling dependencies. I use such a file frequently in production projects where I can't currently use cmake-conan
, and it would solve some problems I face with those projects that do use cmake-conan
.