Test whether internal-dep include order is preserved

https://github.com/mesonbuild/meson/issues/1495
This commit is contained in:
Nirbheek Chauhan
2017-03-23 08:28:23 +05:30
parent dd828e3fd7
commit 8482286236
3 changed files with 11 additions and 0 deletions

View File

@ -19,4 +19,12 @@ subdir('sub3')
# The directory where the target resides
subdir('sub4')
# Test that the order in which internal dependencies are specified is
# preserved. This is needed especially when subprojects get involved and
# multiple build-root config.h files exist, and we must be sure that the
# correct one is found: https://github.com/mesonbuild/meson/issues/1495
f = executable('somefxe', 'sub4/main.c',
dependencies : [correctinc, dep, wronginc])
test('eh', e)
test('oh', f)

View File

@ -1 +1,2 @@
j = include_directories('.')
wronginc = declare_dependency(include_directories : j)

View File

@ -2,3 +2,5 @@ e = executable('someexe', 'main.c',
c_args : ['-I' + sub3],
include_directories : j,
dependencies : dep)
correctinc = declare_dependency(include_directories : include_directories('.'))