diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-01-02 21:34:39 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-01-02 21:34:39 +0200 |
commit | 4c041e2aec22f007b79a314d6f0472a1bc9bae2f (patch) | |
tree | c004a878cf825d2408382821f2f195158294fd8a /compilers.py | |
parent | edaf663ee2e7dfc01af3cace2f83a3fca7ef94d3 (diff) | |
download | meson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.zip meson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.tar.gz meson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.tar.bz2 |
Can tag include directories as system dirs to reduce compiler warning noise. Closes #345.
Diffstat (limited to 'compilers.py')
-rw-r--r-- | compilers.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compilers.py b/compilers.py index be22d22..55b41dc 100644 --- a/compilers.py +++ b/compilers.py @@ -264,9 +264,11 @@ class CCompiler(Compiler): def get_std_exe_link_args(self): return [] - def get_include_args(self, path): + def get_include_args(self, path, is_system): if path == '': path = '.' + if is_system: + return ['-isystem', path] return ['-I' + path] def get_std_shared_lib_link_args(self): @@ -1174,6 +1176,12 @@ class VisualStudioCCompiler(CCompiler): result.append(i) return result + def get_include_args(self, path, is_system): + if path == '': + path = '.' + # msvc does not have a concept of system header dirs. + return ['-I' + path] + class VisualStudioCPPCompiler(VisualStudioCCompiler): def __init__(self, exelist, version, is_cross, exe_wrap): VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap) @@ -1588,7 +1596,7 @@ end program prog return True return False - def get_include_args(self, path): + def get_include_args(self, path, is_system): return ['-I' + path] def get_module_outdir_args(self, path): |