Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.
Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
With executable(), if the link_with argument has a string as one of it's
elements, meson ends up throwing an AttributeError exception:
...
File "/home/lyudess/Projects/meson/mesonbuild/build.py", line 868, in link
if not t.is_linkable_target():
AttributeError: 'str' object has no attribute 'is_linkable_target'
Which is not very helpful in figuring out where exactly the project is
trying to link against a string instead of an actual link target. So,
fix this by verifying in BuildTarget.link() that each given target is
actually a Target object and not something else.
Additionally, add a simple test case for this in failing tests. At the
moment, this test case just passes unconditionally due to meson throwing
the AttributeError exception and failing as expected. However, this test
case will be useful eventually if we ever end up making failing tests
more strict about failing gracefully (per advice of QuLogic).
Archlinux doesn't package tinfo, and the non-distro maintained package
(in the AUR), doesn't provide a pkgconfig, it just symlinks libncurses.
So just pick something else. glib-2.0 is used elsewhere in meson's test
suite, so that should be safe.
subproject using wrap-file is broken since commit (68bd64c Prevent
projects from directly grabbing files from other subprojects. )
subproject with wrap-file usually have version number after name
- **sproj_name** is `zlib-1.2.8` according to `directory = zlib-1.2.8`
of zlib.wrap
- but **self.subproject** `zlib`
I've typo'd "value" for the last time, options needs a kwargs validator.
This validator is slightly different than the one used by the main
parser, since it operates on a much simpler representation than the
other one does, and they are not interchangeable.
This also changes the optinterpreter to use pop on 'type' and
'description' so that they're not passed to the validator as kwargs.
The new implementation will correctly pick boost from 3 possible
locations on windows and two locations on posix compatible OSs.
The new search algorithm also differentiates between debug and
release builds of Boost and multi or single threading builds.
It was also decided to map "Meson modules" to Boost software libraries
and not Boost modules since it there are a lot of options regarding
linking. Some modules can even be used either as headers-only or with
dynamic linking.
This commit also fixes a bug that prevented header-only use on Windows.
Fixes: #2274#2239#1803#669
This allows a CustomTarget to be indexed, and the resulting indexed
value (a CustomTargetIndex type), to be used as a source in other
targets. This will confer a dependency on the original target, but only
inserts the source file returning by index the original target's
outputs. This can allow a CustomTarget that creates both a header and a
code file to have it's outputs split, for example.
Fixes#1470
Currently sources, generated sources, or objects are considered to be
sources for a target, but link_whole should also fulfill the sources
requirement.
Fixes#2180
Currently meson only considers what compiler/linker were used by a
Target's immediate sources or objects, not the sources of libraries it's
linked with by the link_with and link_while keywords. This means that if
given 3 libraries: libA which is C++, libB which is C, and libC which is
also C, and libC links with libB which links with libA then linking libC
will be attempted with the C linker, and will fail.
This patch corrects that by adding the compilers used by sub libraries
to the collection of compilers considered by meson when picking a
linker.
This adds a new process_compilers_late method to the BuildTarget class,
which is evaluated after process_kwargs is called. This is needed
because some D options need to be evaluated after compilers are
selected, while for C-like languages we need to check the link* targets
for language requirements, and link* targets are passed by kwargs.
This implementation is recursive, since each Target adds it's parent's
dependencies.
Add new 'docbook' argument which generates Docbook documentation for
each D-Bus interface. The docbook argument will be used as prefix
in `PREFIX`-NAME.xml pattern, and NAME will be replaced by the D-Bus
interfaces.
Of course D compilers have different flags to set some important
D-specific settings. This adds a simple method to change these flags in
a compiler-agnostic way in Meson.
This replaces the previous `unittest_args` method with a more generic
variant.