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

meson: Basic meson support #299

Merged
merged 3 commits into from
Jul 25, 2019
Merged

meson: Basic meson support #299

merged 3 commits into from
Jul 25, 2019

Conversation

mensinda
Copy link
Contributor

With this patch, CLI11 can be used as a meson
subproject: http://mesonbuild.com/Subprojects.html

However, CMake is still required for testing and
installation. The current meson.build is not a
complete replacement.

@mensinda
Copy link
Contributor Author

The Azure CI errors are unrelated.

@codecov
Copy link

codecov bot commented Jul 20, 2019

Codecov Report

Merging #299 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #299   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        2880   2880           
=====================================
  Hits         2880   2880

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73aa158...db5b49b. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 20, 2019

Codecov Report

Merging #299 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #299   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        2887   2887           
=====================================
  Hits         2887   2887

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f583e5b...5757e15. Read the comment docs.

@henryiii
Copy link
Collaborator

I plan to fix the CI then merge this, probably in the next few days...

@henryiii
Copy link
Collaborator

Could you rebase and force push (or just merge) with current master? Thanks!

With this patch, CLI11 can be used as a meson
subproject: http://mesonbuild.com/Subprojects.html

However, CMake is still required for testing and
installation. The current meson.build is not a
complete replacement.
@mensinda
Copy link
Contributor Author

Done. Let's hope the CI gets green :)

@henryiii
Copy link
Collaborator

henryiii commented Jul 25, 2019

How hard would it be to add a new job to Azure to run meson with a little example project that uses this? (Not very familiar with Meson)

@mensinda
Copy link
Contributor Author

Depends. That project would have to include the CLI11 repository in its's subproject directory. So, copying the CLI11 repo in the CI or a seperate repository would be required. Also python (>= 3.5), meson and ninja would be required on all images.

The actual project would be fairly simple and easy to provide, however, implementing this in the CI will probably the most difficult part.

@henryiii
Copy link
Collaborator

Could you provide the example project? I can probably set up the ci pretty easily. At the minimum, I could do a brew install meson on a mac image. We can symlink CLI11 into the directory as part of the test before running the meson build. I can merge this PR and we work in a new PR, or we can work in this PR, your call.

@mensinda
Copy link
Contributor Author

Adding it to this PR should work. Do you have any preferences where to put the test?

@henryiii
Copy link
Collaborator

In a folder in the test folder. If it looks really useful as an example it might eventually be moved into the examples folder.

@mensinda
Copy link
Contributor Author

Added the test project. Also a minimal README.md, in case this will be a meson example.

@henryiii
Copy link
Collaborator

henryiii commented Jul 25, 2019

This does not add the C++ standard setting, so it fails if you build on LLVM (or probably GCC < 6).

ccache c++ -Imain@exe -I. -I.. -I../subprojects/CLI11/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -g -MD -MQ 'main@exe/main.cpp.o' -MF 'main@exe/main.cpp.o.d' -o 'main@exe/main.cpp.o' -c ../main.cpp

(macOS)

@mensinda
Copy link
Contributor Author

Should be fixed now (defaults to c++11)

@henryiii
Copy link
Collaborator

I believe it does not pick up the default (should be minimum...) C++ standard from a target. Not sure why this is supposed to be better than CMake... But, okay.

@henryiii
Copy link
Collaborator

It also does not regenerate correctly and has to have the build directory removed before it picks up the change...

@mensinda
Copy link
Contributor Author

I mean, the C++ std is now c++11 for the project by default with my changes. The default options are only applied when generating a new build directory. Changing options of an already existing directory has to be done with meson configure

@henryiii
Copy link
Collaborator

Yes, but I would have thought it would have made it C++11 because the sub-project was C++11, but that's not too bad. When I ran meson build again, it said that ninja would regenerate if necessary, but it did not because the build file changed. Just seems like usability issues.

@henryiii
Copy link
Collaborator

Should be ready to merge. Would you like it in examples instead of tests? I'd be okay with that.

@mensinda
Copy link
Contributor Author

I would like to keep it in tests for now. It is a bit minimal for an example in the current state. Maybe I do a new PR in the future with a bit more content

@henryiii
Copy link
Collaborator

Okay. Thanks!

@henryiii henryiii merged commit dbd4933 into CLIUtils:master Jul 25, 2019
@mensinda mensinda deleted the meson branch July 25, 2019 21:27
@henryiii henryiii added this to the v1.9 milestone Dec 31, 2019
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