Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] [2.0] predefined layouts when playing locally #10645

Closed
lasote opened this issue Feb 23, 2022 · 0 comments · Fixed by #10659
Closed

[feature] [2.0] predefined layouts when playing locally #10645

lasote opened this issue Feb 23, 2022 · 0 comments · Fixed by #10659
Assignees
Milestone

Comments

@lasote
Copy link
Contributor

lasote commented Feb 23, 2022

  • When you work, let's say with CMake, with conan local commands and/or building locally with the build system, if you have a source() method to retrieve the external sources, (e.g conan-center) you may want to adjust the layout as:
    def layout(self):
        cmake_layout(self)
        self.folders.source = "src"

The self.folders.source = "src" is because you don't want to end up with a bunch of cloned/unzipped files at the root directory of your package.

  • It happens also with any other build system, for example, using Autotools (we don't have any preset layout for that) you might want to declare something like:
    def layout(self):
         self.folders.build = os.path.join("build", str(self.settings.build_type))
         self.folders.generators = os.path.join(self.folders.build, "conan")
         self.folders.source = "src"

Because you don't want either the cloned "src" or the build/generators littering your package folder.

  • Given that the previous definition is totally random, not attached to Autotools at all, we should consider to add a basic_layout() helper.
  • Given that in both cases we are interested in not littering the repo with the cloned sources, consider an argument to all the layouts external_sources=True to assign a "src" folder.
  • Check if the Meson layout is generic and it could be renamed.

EDIT: Consider not having the "build_type" setting for a basic layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants