Description
What is your question?
Hello,
I'm developing a library package and would like to work with a custom build folder layout.
Goal is the simultaneous development of multiple architectures within a single IDE instance.
For now, I want this custom build folder layout only to be applied within my project without worrying about breaking other peoples stuff.
First I tried with cmake_layout
s build_folder argument inside my recipe.
This had the drawback that for two architectures, the generated cmake user presets ended up with the same name.
Finally, I figured out that tools.cmake.cmake_layout:build_folder_vars
does what I want.
I end up with a build folder like: build/<settings.arch>
and a configure preset named <settings.arch>
.
Unfortunately I found no way to specify this setting inside my recipe only.
So I had to put it into my profiles.
cross
[settings]
arch=armv8
# ...
[conf]
mypackage:tools.cmake.cmake_layout:build_folder_vars=["settings.arch"]
mypackage:tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"
native
[settings]
arch=x86_64
# ...
[conf]
mypackage:tools.cmake.cmake_layout:build_folder_vars=["settings.arch"]
mypackage:tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"
Here I encountered two problems:
- Limiting the elements of the
[conf]
section to my package does not seem to be recognized (Possibly due to two colons). Not limiting it to my package affects the build folder layout of others. - Everytime I build my package, I need to ensure that the users profile has this settings set.
Is there a way to specify tools.cmake.cmake_layout:build_folder_vars
only for my recipe without the manipulation of profiles?
Have you read the CONTRIBUTING guide?
- I've read the CONTRIBUTING guide