(#12934) docs: 2.0 migration guidance for subfolders

https://github.com/conan-io/conan-center-index/pull/12878#issuecomment-1243569956
This commit is contained in:
Chris Mc
2022-09-14 21:24:26 -06:00
committed by GitHub
parent 28bac59ddb
commit 8063e30180
2 changed files with 10 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ If possible, try to avoid mixing single quotes (`'`) and double quotes (`"`) in
When extracting sources or performing out-of-source builds, it is preferable to use a _subfolder_ attribute, `_source_subfolder` and `_build_subfolder` respectively.
> **Note**: These are only required when using the legacy generator such as `cmake`. For the new generators like `CMakeToolchain` see
> the [2.0 Migration Guide](v2_migration.md#using-layout-with-new-generators) for more information.
For example doing this with property attributes for these variables:
```py

View File

@@ -26,6 +26,11 @@ changes and improvements, you can read about them in the
This document is a practical guide, offering extended information particular to Conan
Center Index recipes to get them ready to upgrade to Conan 2.0.
## Using Layout with New Generators
All recipes should use a layout, when doing this there is no need to manually define `self._subfolder_[...]` in a recipe.
Simply use `self.source_folder` and `self.build_folder` instead of [subfolder properties](reviewing.md#subfolder-properties)
## New cpp_info set_property model
New Conan generators like