aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-03-12 14:21:31 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2017-03-12 08:37:14 -0400
commit1612dbd719cafc88db2da098a035c82456e4c638 (patch)
treef9a749083a4751f7dcde213e467c14294cf6da54 /mesonbuild/compilers.py
parent853634a48da025c59eef70161dba0d150833f60d (diff)
downloadmeson-1612dbd719cafc88db2da098a035c82456e4c638.zip
meson-1612dbd719cafc88db2da098a035c82456e4c638.tar.gz
meson-1612dbd719cafc88db2da098a035c82456e4c638.tar.bz2
has_header: Use "foo.h" syntax instead of <foo.h>
This is broken on GCC due to a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80005 It doesn't matter whether we use <> or "" in our checks because we run them from an empty temporary directory anyway. Includes a test for all this. Closes https://github.com/mesonbuild/meson/issues/1458
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 8ea161d..e600149 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -895,11 +895,11 @@ class CCompiler(Compiler):
fargs = {'prefix': prefix, 'header': hname}
code = '''{prefix}
#ifdef __has_include
- #if !__has_include(<{header}>)
+ #if !__has_include("{header}")
#error "Header '{header}' could not be found"
#endif
#else
- #include<{header}>
+ #include <{header}>
#endif'''
return self.compiles(code.format(**fargs), env, extra_args,
dependencies, 'preprocess')