tests: add test to make sure include_directories() order is maintained

pull/2976/head
Tim-Philipp Müller 7 years ago committed by Maxim Dzabraev
parent 2fa44cf326
commit 47508e217f
  1. 1
      test cases/common/138 include order/inc1/hdr.h
  2. 1
      test cases/common/138 include order/inc2/hdr.h
  3. 4
      test cases/common/138 include order/meson.build
  4. 11
      test cases/common/138 include order/ordertest.c

@ -30,3 +30,7 @@ f = executable('somefxe', 'sub4/main.c',
test('eh', e)
test('oh', f)
# Test that the order in include_directories() is maintained
incs = include_directories('inc1', 'inc2')
executable('ordertest', 'ordertest.c', include_directories: incs)

@ -0,0 +1,11 @@
#include "hdr.h"
#if !defined(SOME_DEFINE) || SOME_DEFINE != 42
#error "Should have picked up hdr.h from inc1/hdr.h"
#endif
int
main (int c, char ** argv)
{
return 0;
}
Loading…
Cancel
Save