Previously Meson would use the name of the first .vala source file. This
doesn't work for some projects. Tracker is one example: it has
several libraries that mix Vala and C code. In such cases, none of the
.vala files tend to bear the name of the library we actually want to
generate.
This allows the user to specify custom arguments to the compiler to be used
while performing cross-compiler checks. For example, passing a GCC specs file as
c_link_args so that a "prefix" filled with libraries that are to be compiled
against can be found with cc.find_library, or an `-mcpu` c_arg that is required
for compilation.
Also ensure that unix_link_flags_to_native() and unix_compile_flags_to_native()
always return a copy of the original arguments and not a reference to the
original arguments. We never want to modify the original arguments.
This allows defining test suites for test-valgrind target without the risk
of e.g. being unable to differentiate the targets test-valgrind (testing
with valgrind) from test-valgrind (testing the valgrind subproject).
Do not modify the wrap command argument from the calling function.
Appending the valgrind arguments to the wrap list argument will cause all
the valgrind arguments to cumulate from all the tests to the wrapper
command itself.
This is required for checking for compiler checks that involve linking
to a static library with MSVC. Without this, MSVC errors out since no
CRT is specified.
Without this, checks with incompatible versions but the same library would
return true. Example:
dependency('zlib', version : '>=1.2')
dependency('zlib', version : '<1.0') # this will return the same dep again!
Example: https://github.com/mesonbuild/meson/issues/568
This simply sets the default version to be the same as the project version.
Useful for dependency version checks when using fallback subproject internal
dependencies.
This allows a project to use the same fallbacks dependency from the same
subproject multiple times in the same way that external dependencies can be.
Also change the format of the dependency identifier to ensure that fallback
checks with different dirname/varname aren't mistakenly reused. We now use
a tuple for this because the format is simpler to construct and it gives us the
same immutability guarantees as a string which is needed for using it as
a dictionary key.