diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-11 00:03:55 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-11 00:03:55 +0200 |
commit | 79537b54dbdaf467e425f6337d1c1566c4ccf26b (patch) | |
tree | d1cb319ca6bbf274c31b8e55b4ce332f90cce2e7 | |
parent | 118e043143a2dd13a9862ede278e1584ca194e72 (diff) | |
download | meson-79537b54dbdaf467e425f6337d1c1566c4ccf26b.zip meson-79537b54dbdaf467e425f6337d1c1566c4ccf26b.tar.gz meson-79537b54dbdaf467e425f6337d1c1566c4ccf26b.tar.bz2 |
Implicit include directories go first.
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index f5c06dc..c4ed9de 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1427,7 +1427,8 @@ rule FORTRAN_DEP_HACK raise RuntimeError('Fug') extra_orderdeps = [] compiler = self.get_compiler_for_source(src) - commands = self.generate_basic_compiler_args(target, compiler) + commands = [] + # The first thing is implicit include directories: source, build and private. commands += compiler.get_include_args(self.get_target_private_dir(target), False) curdir = target.get_subdir() tmppath = os.path.normpath(os.path.join(self.build_to_src, curdir)) @@ -1435,6 +1436,7 @@ rule FORTRAN_DEP_HACK if curdir == '': curdir = '.' commands += compiler.get_include_args(curdir, False) + commands += self.generate_basic_compiler_args(target, compiler) # -I args work differently than other ones. In them the # first found directory is used whereas for other flags # (such as -ffoo -fno-foo) the latest one is used. |