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

More Meson work #1025

Merged
merged 11 commits into from
May 1, 2024
Merged

More Meson work #1025

merged 11 commits into from
May 1, 2024

Conversation

dcbaker
Copy link
Contributor

@dcbaker dcbaker commented Mar 20, 2024

This is follow up work to my previous series. I've tried to make the Meson build mirror the CMake build more closely. I've also made an attempt at adding some instructions to the documents on using Meson.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4ee3af) to head (8267dde).
Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #1025    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           17        17            
  Lines         4546      4557    +11     
  Branches         0       971   +971     
==========================================
+ Hits          4546      4557    +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Pretty sure this is the wrong directory - I think you meant include/meson.build, since CLI11.hpp sits inside include in the current CMake build.

Even so, I'm still not very fond of the idea of playing anything besides headers inside /include. It's valid to -I include it, and it seems weird to have meson files there too. Maybe it would be better to make a new dir, single-include, and place meson.build and the single file output there. We could also move the CMake output there, and even put the CMake single header file code there too.

henryiii added a commit that referenced this pull request May 1, 2024
See #1025.

---------

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@henryiii
Copy link
Collaborator

henryiii commented May 1, 2024

I've moved the single file to it's own folder, so now it should be possible to avoid the meson.build file inside the include dir.

dcbaker and others added 11 commits May 1, 2024 14:22
…dir`

The latter has been deprecated due to it's ambiguity.
This models the upstream recommendation that consumers avoid the
`subproject('CLI11').get_variable('dep_cli11')` pattern, and instead
simply use `dependency('CLI11')`. This allows build scripts to switch
between system provided dependencies found with pkg-config or cmake, and
subprojects configured and built with the main project without
modification to the build scripts. Users can use the Meson options
`--wrap-mode` and `--force-fallback-for` to get the behavior that they
want.

I have added the `--force-fallback-for=CLI11` switch to the CI to ensure
that the test continues to exercise what it's intended to.
This should be a replica of what the CMake does
Tries to match the CMake behavior. It does fail in the Helper tests, but
I was unable to get CMake to build the pre-compiled configuration at
all.
Since this section is still about CMake
Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii merged commit 6d83f45 into CLIUtils:main May 1, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants