To help us debug your issue please explain:
This results in:
conanfile.txt: ERROR: Generator CmakeToolchain(file:conan_toolchain.cmake) failed
'ConanFile' object has no attribute 'install_folder'
ERROR: 'ConanFile' object has no attribute 'install_folder'
I'm not sure if this is the custom generator misusing CMakeDefininitionsBuilder, or the CMakeDefininitionsBuilder using install_folder when it should not.
I think the functionality this custom generator brings are great and I am willing to have a look to fix this in a good way (on conan or CmakeToolchain), but for now I am clueless :-).
Able to reproduce it with:
git clone https://github.com/pepe82sh/ConanCmakeToolchainGenerator
cd ConanCmakeToolchainGenerator
conan create . user/testing
Hi @mjvk
This shouldn't be considered a bug, because you are using internal private components of Conan which are not documented nor stable :)
However, as in the context of a generator it seems reasonable that the generator itself should have the install_folder defined. I am submitting a PR (https://github.com/conan-io/conan/pull/5569) that could fix this. How urgent it is? Why might try to release a 1.18.1 patch if necessary.
What I really like is your generator. We are currently reviewing Conan approach to integrate build systems and we definitely want to generate a toolchain, just like you are doing. We will certainly take some ideas and learning from it, thanks very much for sharing!!
All credits go to @pepe82sh ! No hurry it is possible to circumvent it by just setting an empty install folder.
The generator was an idea that emerged in #2956. Thanks for the mention @mjvk !
This has been merged, will be released in 1.19
Most helpful comment
All credits go to @pepe82sh ! No hurry it is possible to circumvent it by just setting an empty install folder.