You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autotools package support building outside of the source tree folder using the approach
cd $build
../configure && make && ...
for those autotools package supporting this mode a autotools_layout() function should exists with the same function as cmake_layout as to set the build_folder directly in the recipe of via a settings set in the conan profile.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
In order to consider this feature, it would be necessary to have some evidence of autotools projects supporting this flow. Up to my knowledge the vast majority of projects will work building only in-source.
Then, the best way to proceed is to define a very simple example, like using conan new autotools_lib, and first write manually a layout() method that implements the necessary layout, and then it can be taken from there and abstract that layout() method into its own helper if necessary.
Could you please provide:
Some references of existing autotools projects that allow building outside of the source
A very basic, the most simple autotools based project (ideally starting from conan new autotools_lib with a manually written layout() method that would implement the out-of-source build?
The out-of-source build feature (also referred to as parallel build trees) of autotools/automake is not new.
You can find many articles about it on Google. And you can pull recent autotools based package to try it in a shell directly.
As with anything, some package may not use this function and may write build system file that make it incompatible, similar things can also be done in CMake (but it is a little harder to achieve thanks to the higher level language used).
I have been checking this.
Autotools helpers already have the basic_layout() that locates the "build" folder outside of the source folder. This layout will create a build-release or build-debug folders for the build by default, and can also be instructed to create a different one with --output-folder=myfolder. You can cd to that folder and issue the commands for the build.
The cmake_layout() has a build_folder argument because its logic is way more complex than the one for basic_layout(). For an autotools project, users can directly do:
Interesting, is there a way to harmonize those two layout so that we can set the build folder to be similar independently of cmake/autotool usage, which is really what I wish here.
I think that the way it should work is that we should set our "desire" build folder value/format, then if the tool can use an out-of-source folder to build, it default to that.
Instead of having one way to set it for cmake, and a different way to set it for autotools...
What is your suggestion?
autotools package support building outside of the source tree folder using the approach
cd $build
../configure && make && ...
for those autotools package supporting this mode a autotools_layout() function should exists with the same function as cmake_layout as to set the build_folder directly in the recipe of via a settings set in the conan profile.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: