test/7 gnome: Fix on ICC and suppress a warning

Ignore warning 2282 about GCC pragmas since they are emitted in system
headers and are extremely spammy. They are emitted because ICC pretends
to be GCC via C macros but doesn't implement some pragmas.

https://bugzilla.gnome.org/show_bug.cgi?id=776562

Also, append to LD_LIBRARY_PATH because ICC uses that for some internal
libraries such as libintlc.so.
pull/1253/head
Nirbheek Chauhan 8 years ago
parent 78325f884d
commit 84931e1f78
  1. 8
      test cases/frameworks/11 gir subproject/gir/meson.build
  2. 7
      test cases/frameworks/7 gnome/gir/meson.build
  3. 10
      test cases/frameworks/7 gnome/meson.build

@ -28,8 +28,10 @@ gnome.generate_gir(
message('TEST: ' + girsubproject.outdir())
envdata = environment()
envdata.append('GI_TYPELIB_PATH', girsubproject.outdir(), 'subprojects/mesongir', separator : ':')
envdata.append('LD_LIBRARY_PATH', girsubproject.outdir(), 'subprojects/mesongir')
test('gobject introspection/subproject/c', girexe)
test('gobject introspection/subproject/py', find_program('prog.py'),
env : ['GI_TYPELIB_PATH=' + girsubproject.outdir() + ':subprojects/mesongir',
'LD_LIBRARY_PATH=' + girsubproject.outdir() + ':subprojects/mesongir',
])
env : envdata)

@ -33,7 +33,8 @@ gnome.generate_gir(
test('gobject introspection/c', girexe)
gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir()])
envdata = environment()
envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':')
envdata.append('LD_LIBRARY_PATH', gir_paths)
test('gobject introspection/py', find_program('prog.py'),
env : ['GI_TYPELIB_PATH=' + gir_paths,
'LD_LIBRARY_PATH=' + gir_paths,
])
env : envdata)

@ -1,5 +1,14 @@
project('gobject-introspection', 'c')
cc = meson.get_compiler('c')
add_global_arguments('-DMESON_TEST', language : 'c')
if cc.get_id() == 'intel'
# Ignore invalid GCC pragma warnings from glib
# https://bugzilla.gnome.org/show_bug.cgi?id=776562
add_global_arguments('-wd2282', language : 'c')
endif
gnome = import('gnome')
gio = dependency('gio-2.0')
giounix = dependency('gio-unix-2.0')
@ -7,7 +16,6 @@ glib = dependency('glib-2.0')
gobj = dependency('gobject-2.0')
gir = dependency('gobject-introspection-1.0')
gmod = dependency('gmodule-2.0')
add_global_arguments('-DMESON_TEST', language : 'c')
subdir('resources-data')
subdir('resources')

Loading…
Cancel
Save