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

[MesonToolchain] Adding default dirs #11618

Merged
merged 8 commits into from Jul 14, 2022

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Jul 12, 2022

Changelog: Feature: Adding default directories to MesonToolchain.
Docs: conan-io/docs#2652

Closes: #9713
Closes: #11596

Note: Using the basic_layout seems to be enough for now.

@franramirez688 franramirez688 added this to the 1.51 milestone Jul 12, 2022
@franramirez688 franramirez688 requested a review from SSE4 July 12, 2022 10:51
@@ -45,6 +45,8 @@ def install(self):
self._conanfile.run(cmd)

def test(self):
if self._conanfile.conf.get("tools.build:skip_test"):
return
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing these lines from new Meson build-helper

@SSE4
Copy link
Contributor

SSE4 commented Jul 12, 2022

it would be helpful to add some test/example on how to use basic_layout together with MesonToolchain. AFAIK existing meson tests don't create an instance of basic_layout...

@franramirez688 franramirez688 marked this pull request as ready for review July 12, 2022 14:40
@franramirez688
Copy link
Contributor Author

franramirez688 commented Jul 12, 2022

AFAIK existing meson tests don't create an instance of basic_layout...

The meson_lib template is using that layout and we already have this functional test test_meson_lib_template using it. Should it be enough? Perhaps I could add another one if you think that is really needed.

@SSE4
Copy link
Contributor

SSE4 commented Jul 12, 2022

The meson_lib template is using that layout and we already have this functional test test_meson_lib_template using it. Should it be enough? Perhaps I could add another one if you want is really needed.

yeah, as I have figured it out from https://docs.conan.io/en/latest/reference/conanfile/tools/layout.html?highlight=basic_layout#basic-layout:

from conan.tools.layout import basic_layout

def layout(self):
    basic_layout(self)

and conanfile_sources_v2 does exactly that.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

install_data(['src/file1.txt', 'src/file2.txt'])
""")
# Replace meson.build
self.t.save({"meson.build": _meson_build,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if so much replace of the initial template is going to happen, then maybe it is worth to define things here?

I am also happy if we add the install bit to the meson templates, for example, adding a License, and making sure that the install is packaging the license too?

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