Replies: 2 comments 1 reply
-
Why can't I specify target files with a wildcard? executable('myprog', sources : '*.cpp') # This does NOT work! One of the main requirements of Meson is that it must be fast. This means that a no-op build in a tree of 10 000 source files must take no more than a fraction of a second. This is only possible because Meson knows the exact list of files to check. If any target is specified as a wildcard glob, this is no longer possible. Meson would need to re-evaluate the glob every time and compare the list of files produced against the previous list. This means inspecting the entire source tree (because the glob pattern could be src/*/*/*/*.cpp or something like that). This is impossible to do efficiently. The main backend of Meson is Ninja, which does not support wildcard matches either, and for the same reasons. Because of this, all source files must be specified explicitly. |
Beta Was this translation helpful? Give feedback.
-
This is a decision that has been made, but not necessarily a good one. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Note that this is without using Python or any other scripting language to assist meson.
Beta Was this translation helpful? Give feedback.
All reactions