diff options
author | Niklas Claesson <nicke.claesson@gmail.com> | 2017-09-14 10:05:37 +0200 |
---|---|---|
committer | Niklas Claesson <nicke.claesson@gmail.com> | 2017-10-01 18:35:33 +0200 |
commit | 09ccd0eeaad402f1e7e5b18bd1ad168a9db2998b (patch) | |
tree | e40e696c26b43be780ddca6ede9c8bc07e91507a /mesonbuild/dependencies/misc.py | |
parent | 488e57332f2264594ec8e05369664c6a7833f692 (diff) | |
download | meson-09ccd0eeaad402f1e7e5b18bd1ad168a9db2998b.zip meson-09ccd0eeaad402f1e7e5b18bd1ad168a9db2998b.tar.gz meson-09ccd0eeaad402f1e7e5b18bd1ad168a9db2998b.tar.bz2 |
C/C++: Get default include dirs from compilers
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index c2b6dbd..61d0d77 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -116,18 +116,7 @@ class BoostDependency(ExternalDependency): # and http://stackoverflow.com/questions/37218953/isystem-on-a-system-include-directory-causes-errors # for more details - # TODO: The correct solution would probably be to ask the - # compiler for it's default include paths (ie: "gcc -xc++ -E - # -v -") and avoid including those with -isystem - - # For now, use -isystem for all includes except for some - # typical defaults (which don't need to be included at all - # since they are in the default include paths). These typical - # defaults include the usual directories at the root of the - # filesystem, but also any path that ends with those directory - # names in order to handle cases like cross-compiling where we - # might have a different sysroot. - if not include_dir.endswith(('/usr/include', '/usr/local/include')): + if include_dir and include_dir not in self.compiler.get_default_include_dirs(): args.append("".join(self.compiler.get_include_args(include_dir, True))) return args |