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

Cannot include Criterion as meson subproject #327

Closed
tsieprawski opened this issue Jan 2, 2020 · 0 comments · Fixed by Snaipe/BoxFort#26 or #328
Closed

Cannot include Criterion as meson subproject #327

tsieprawski opened this issue Jan 2, 2020 · 0 comments · Fixed by Snaipe/BoxFort#26 or #328

Comments

@tsieprawski
Copy link
Contributor

Hello!

I've tried to use Criterion in my project as meson's wrap-based subproject, and during simplest meson build I got some issues related build scripts using wrong paths. meson.source_root() is used for ci/isdir.py and dependencies, and in a subproject there are unfindable by default:

subprojects/criterion/meson.build:20:0: ERROR: Program or command '/home/tomasz/criterion-bug-source-dir/ci/isdir.py' not found or not executable
subprojects/boxfort/meson.build:19:0: ERROR: Program or command '/home/tomasz/criterion-bug-source-dir/ci/isdir.py' not found or not executable

Thankfully using meson.current_source_dir() is enough - see the below ugly fix. I'll try to produce a pull request for that. :)

Here's the minimal repo I've been able to reproduce this, with the ugly in-place fixes: https://hg.sr.ht/~tsieprawski/criterion-bug-source-dir/

sed -i "s|source_root|current_source_dir|" subprojects/criterion/meson.build
sed -i "s|'\.\.\/dependencies\/nanopb|meson.current_source_dir() + '/../dependencies/nanopb|" subprojects/criterion/src/meson.build
sed -i "s|source_root|current_source_dir|" subprojects/boxfort/meson.build

And the asciinema video: video.cast.zip

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