aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-02-12 14:22:36 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-02-21 17:10:06 +0000
commit2f6b7875d4f776a3cf68ee0ec6d4410539af953e (patch)
tree0a01c50db59c629a59dbb3d2c4515ba1fc56ee28 /mesonbuild
parent8d5c6609447c7de30ea2b5b3c502c4b48f2202e2 (diff)
downloadmeson-2f6b7875d4f776a3cf68ee0ec6d4410539af953e.zip
meson-2f6b7875d4f776a3cf68ee0ec6d4410539af953e.tar.gz
meson-2f6b7875d4f776a3cf68ee0ec6d4410539af953e.tar.bz2
Fix for test cases/frameworks/17 mpi on Cygwin
Unusually, the cygwin package for openmpi installs headers into /usr/include, rather than /usr/include/openmpi Prevent pkg-config from suppressing that -I flag, so a gfortran INCLUDE can find those files
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 3357e8e..7a652a4 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -495,7 +495,13 @@ class PkgConfigDependency(ExternalDependency):
return converted
def _set_cargs(self):
- ret, out = self._call_pkgbin(['--cflags', self.name])
+ env = None
+ if self.language == 'fortran':
+ # gfortran doesn't appear to look in system paths for INCLUDE files,
+ # so don't allow pkg-config to suppress -I flags for system paths
+ env = os.environ.copy()
+ env['PKG_CONFIG_ALLOW_SYSTEM_CFLAGS'] = '1'
+ ret, out = self._call_pkgbin(['--cflags', self.name], env=env)
if ret != 0:
raise DependencyException('Could not generate cargs for %s:\n\n%s' %
(self.name, out))