On Wed, Nov 23, 2016 at 8:21 PM, Stephen Morton
<
stephen....@gmail.com> wrote:
> c=compiler.get_compiler('c')
> pth = c.find_library('pthread')
There is a simpler more portable way to do this:
pth = dependency('threads')
> I see how I can add per-target arguments at the time I define the
> executable. Is it possible to add them after the fact, some sort of
> executable.append() or something?
It is not possible by design. All objects are immutable so appending
afterwards is not possible. This makes it simpler to reason about
targets, since every piece of data about it is specified in one single
location.
> Meson appears to do automatic include file dependency handling. But I didn't
> see that in the documentation. Is this true?
Yes. Just declare sources, Meson takes care of the rest.
> For #1, I tried using some python, but it was not valid meson configuration
> language syntax
> db_args=['-m32']
> db_linkargs=['-m32']
> db_args.append('-Wno-error=unused-but-set-variable')
Append is a mutating operation so it is not permitted. However we have
a += operator for this use case:
db_args += ['-Wno-error=unused-but-set-variable')]
This is not mutating the state because it creates a new object and
assigns it to db_args.