meson
meson copied to clipboard
Add preserve_path_from argument when running moc in `headers` mode.
This fixes #10955 partially.
When using the sources kwarg, the moc tool generates .moc files. Those are meant to be #included in a .cpp file, which makes it necessary to add the correct -Ibuild/dir flag to the correct .cpp file compiling command. I'm not sure whether this is wanted or even possible ...
Codecov Report
Merging #10995 (e3df907) into master (97ec20e) will decrease coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #10995 +/- ##
==========================================
- Coverage 68.33% 68.30% -0.03%
==========================================
Files 412 412
Lines 87789 87855 +66
Branches 20708 20724 +16
==========================================
+ Hits 59990 60009 +19
- Misses 23303 23348 +45
- Partials 4496 4498 +2
Impacted Files | Coverage Δ | |
---|---|---|
mesonbuild/modules/qt.py | 75.09% <100.00%> (ø) |
|
scripts/env2mfile.py | 14.49% <0.00%> (-0.81%) |
:arrow_down: |
mesonbuild/scripts/env2mfile.py | 14.49% <0.00%> (-0.81%) |
:arrow_down: |
compilers/detect.py | 46.60% <0.00%> (-0.36%) |
:arrow_down: |
modules/hotdoc.py | 65.48% <0.00%> (-0.35%) |
:arrow_down: |
mesonbuild/modules/hotdoc.py | 65.48% <0.00%> (-0.35%) |
:arrow_down: |
interpreter/primitives/string.py | 98.54% <0.00%> (+0.09%) |
:arrow_up: |
mesonbuild/interpreter/primitives/string.py | 98.54% <0.00%> (+0.09%) |
:arrow_up: |
compilers/asm.py | 52.34% <0.00%> (+0.32%) |
:arrow_up: |
mesonbuild/compilers/asm.py | 52.34% <0.00%> (+0.32%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Would be useful if you edit an existing compile_moc
test to run into the same issues that you ran into
Hey @tristan957 ,
finally got time to do this. :) I think that would be beneficial; you're right.
Unfortunately I have no clue, where to put the test. It seems test cases/frameworks/4 qt
is a good place, but there is so much stuff in there. Can I just add a subdirectory with a self-sufficient test case? And what to name it? After the original issue?
Update: I really have no clue how to set this up! I cannot enter directories multiple times but directories is an integral part of the test, so I can only check one Qt version. I'll try Qt6 then.
OK, I added a test setup. I am not at all happy to restrict the test to Qt 6 but I wouldn't know how else to do it. Also, having this test not as a self-contained entity but as part of this all-encompassing Qt module test is frustrating to say the least. There is no guessing of how much these tests might interact with each other and having some arbitrary directories one
and two
in here is confusing for everybody after me. Can this be done any more sensible?
@xclaesse maybe you can provide some testing guidance?
Any further thoughts on this? I'd like to see this functionality added at some point in the future ... :)
@eli-schwartz could you help provide input? Ideally this could go in before 1.0.0 :)
Some time has passed and again, I am in need of this change. Is there something I can do to get this along?
cc @eli-schwartz | @xclaesse. Could we get this in for 1.1.0?
:+1: I need this feature too.
Would be useful to add this to compile_resources
and compile_ui
as well.
I would rather add the preserve_path_from
to each function, and update documentation accordingly. Will require a release snippet as well.
@punytroll I think maybe this would be much more palatable to you if we just changed the test itself to be parameterized by Qt version using an option plus test.json, rather than doing it in a foreach loop?
Would that be sufficient or do you really desire that it be run as multiple different test case directories each testing one or two things? (I'm not entirely sure I see the necessity of this, but maybe I'm missing something.)