summaryrefslogtreecommitdiffstats
path: root/test cases/unit/60 identity cross/meson.build
blob: 950137a18eac07a53202f1f8d2a391c8ff5a421e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
project('identity cross test', 'c')

assert(meson.get_compiler('c', native: true).get_define(
  'GOT',
  args : [ '-DARG_BUILD' ],
  prefix : '#include "stuff.h"',
  include_directories: include_directories('.'),
) == 'BUILD', 'did not get BUILD from native: true compiler')

assert(meson.get_compiler('c', native: false).get_define(
  'GOT',
  args : [ '-DARG_HOST' ],
  prefix : '#include "stuff.h"',
  include_directories: include_directories('.'),
) == 'HOST', 'did not get HOST from native: false compiler')