1project('nsstring', 'objc')
2
3if host_machine.system() == 'darwin'
4  dep = dependency('appleframeworks', modules : 'foundation')
5elif host_machine.system() == 'cygwin'
6  error('MESON_SKIP_TEST GNUstep is not packaged for Cygwin.')
7else
8  dep = dependency('gnustep', required : false)
9  if not dep.found()
10    error('MESON_SKIP_TEST: GNUstep is not installed')
11  endif
12  if host_machine.system() == 'linux' and meson.get_compiler('objc').get_id() == 'clang'
13    error('MESON_SKIP_TEST: GNUstep is broken on Linux with Clang')
14  endif
15endif
16exe = executable('stringprog', 'stringprog.m', dependencies : dep)
17test('stringtest', exe)
18
19# Ensure that a non-required dep that is not found does not cause an error
20dependency('appleframeworks', modules: 'nonexisting', required: false)
21