diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-08-28 12:20:00 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-28 22:20:00 +0300 |
commit | ba4324ab9ddb883c145f74f5cbe7efc99b29e336 (patch) | |
tree | df667bca3e844f41df5ebc646c1be868c8f95cdc | |
parent | 4143c7bceb0025d9b20d3bcbf2f7d04eb5e0f0ce (diff) | |
download | meson-ba4324ab9ddb883c145f74f5cbe7efc99b29e336.zip meson-ba4324ab9ddb883c145f74f5cbe7efc99b29e336.tar.gz meson-ba4324ab9ddb883c145f74f5cbe7efc99b29e336.tar.bz2 |
Fix gcc include dot
-rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 2 | ||||
-rw-r--r-- | test cases/common/225 include_dir dot/meson.build | 8 | ||||
-rw-r--r-- | test cases/common/225 include_dir dot/rone.h | 1 | ||||
-rw-r--r-- | test cases/common/225 include_dir dot/src/main.c | 5 | ||||
-rw-r--r-- | test cases/common/225 include_dir dot/src/meson.build | 6 | ||||
-rw-r--r-- | test cases/common/225 include_dir dot/src/rone.c | 3 |
6 files changed, 25 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 757dc65..d4318b6 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -286,6 +286,8 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta): return ['-c'] def get_include_args(self, path: str, is_system: bool) -> typing.List[str]: + if not path: + path = '.' if is_system: return ['-isystem' + path] return ['-I' + path] diff --git a/test cases/common/225 include_dir dot/meson.build b/test cases/common/225 include_dir dot/meson.build new file mode 100644 index 0000000..71f7189 --- /dev/null +++ b/test cases/common/225 include_dir dot/meson.build @@ -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')
\ No newline at end of file diff --git a/test cases/common/225 include_dir dot/rone.h b/test cases/common/225 include_dir dot/rone.h new file mode 100644 index 0000000..48d7a79 --- /dev/null +++ b/test cases/common/225 include_dir dot/rone.h @@ -0,0 +1 @@ +int rOne(void);
\ No newline at end of file diff --git a/test cases/common/225 include_dir dot/src/main.c b/test cases/common/225 include_dir dot/src/main.c new file mode 100644 index 0000000..31f6046 --- /dev/null +++ b/test cases/common/225 include_dir dot/src/main.c @@ -0,0 +1,5 @@ +#include "rone.h" + +int main() { + return rOne(); +}
\ No newline at end of file diff --git a/test cases/common/225 include_dir dot/src/meson.build b/test cases/common/225 include_dir dot/src/meson.build new file mode 100644 index 0000000..fcbefb0 --- /dev/null +++ b/test cases/common/225 include_dir dot/src/meson.build @@ -0,0 +1,6 @@ +t = executable( + 'main', + ['main.c', 'rone.c'], + include_directories : inc, + implicit_include_directories : false, +)
\ No newline at end of file diff --git a/test cases/common/225 include_dir dot/src/rone.c b/test cases/common/225 include_dir dot/src/rone.c new file mode 100644 index 0000000..63cb0d3 --- /dev/null +++ b/test cases/common/225 include_dir dot/src/rone.c @@ -0,0 +1,3 @@ +int rOne(void) { + return 1; +}
\ No newline at end of file |