Fix gcc include dot

pull/5549/head
Dylan Baker 5 years ago committed by Jussi Pakkanen
parent 4143c7bceb
commit ba4324ab9d
  1. 2
      mesonbuild/compilers/mixins/gnu.py
  2. 8
      test cases/common/225 include_dir dot/meson.build
  3. 1
      test cases/common/225 include_dir dot/rone.h
  4. 5
      test cases/common/225 include_dir dot/src/main.c
  5. 6
      test cases/common/225 include_dir dot/src/meson.build
  6. 3
      test cases/common/225 include_dir dot/src/rone.c

@ -286,6 +286,8 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta):
return ['-c'] return ['-c']
def get_include_args(self, path: str, is_system: bool) -> typing.List[str]: def get_include_args(self, path: str, is_system: bool) -> typing.List[str]:
if not path:
path = '.'
if is_system: if is_system:
return ['-isystem' + path] return ['-isystem' + path]
return ['-I' + path] return ['-I' + path]

@ -0,0 +1,8 @@
project('Include Here', 'c')
# The layout with the .h file in . and the .c files in src/ is critical to
# tickle the bug #5847
inc = include_directories('.')
subdir('src')

@ -0,0 +1,5 @@
#include "rone.h"
int main() {
return rOne();
}

@ -0,0 +1,6 @@
t = executable(
'main',
['main.c', 'rone.c'],
include_directories : inc,
implicit_include_directories : false,
)

@ -0,0 +1,3 @@
int rOne(void) {
return 1;
}
Loading…
Cancel
Save