Fixed some tests for new stricter options and OSX.

pull/338/head
Jussi Pakkanen 9 years ago
parent d71f51d220
commit 7cad8a1bfb
  1. 20
      test cases/common/94 default options/meson.build
  2. 5
      test cases/common/99 benchmark/meson.build

@ -2,7 +2,6 @@ project('default options', 'cpp', 'c', default_options : [
'buildtype=debugoptimized', 'buildtype=debugoptimized',
'cpp_std=c++03', 'cpp_std=c++03',
'cpp_eh=none', 'cpp_eh=none',
'c_std=-crashcompiler',
]) ])
cpp = meson.get_compiler('cpp') cpp = meson.get_compiler('cpp')
@ -15,11 +14,16 @@ else
assert(get_option('cpp_std') == 'c++03', 'C++ std value wrong.') assert(get_option('cpp_std') == 'c++03', 'C++ std value wrong.')
endif endif
# Verify that project args are not used when told not to. # FIXME. Since we no longer accept invalid options to c_std etc,
# MSVC plain C does not have a simple arg to test so skip it. # there is no simple way to test this. Gcc does not seem to expose
if cpp.get_id() != 'msvc' # the C std used in a preprocessor token so we can't check for it.
cc = meson.get_compiler('c') # Think of a way to fix this.
assert(not cc.compiles('int foobar;'), 'Default arg not used in test.') #
assert(cc.compiles('int foobar;', no_builtin_args : true), 'No_builtin did not disable builtins.') # # Verify that project args are not used when told not to.
endif # # MSVC plain C does not have a simple arg to test so skip it.
# if cpp.get_id() != 'msvc'
# cc = meson.get_compiler('c')
# assert(not cc.compiles('int foobar;'), 'Default arg not used in test.')
# assert(cc.compiles('int foobar;', no_builtin_args : true), 'No_builtin did not disable builtins.')
# endif

@ -1,5 +1,4 @@
project('benchmark', 'c', project('benchmark', 'c')
default_options : ['c_std=gnu99'])
delayer = executable('delayer', 'delayer.c') delayer = executable('delayer', 'delayer.c', c_args : '-D_GNU_SOURCE')
benchmark('delayer', delayer) benchmark('delayer', delayer)

Loading…
Cancel
Save