diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-05 16:58:18 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-05 17:37:07 +0530 |
commit | f14684c5cb2241665e9ea152f842632b70f4296b (patch) | |
tree | c299190bff46203496db50d6f88fa7cd1629830d /mesonbuild/compilers.py | |
parent | 11968382a3800f7dd6d04b3a94d4351f0950dd9a (diff) | |
download | meson-f14684c5cb2241665e9ea152f842632b70f4296b.zip meson-f14684c5cb2241665e9ea152f842632b70f4296b.tar.gz meson-f14684c5cb2241665e9ea152f842632b70f4296b.tar.bz2 |
get_define: Add prefix before ifndef block
Otherwise the compiler will warn about macros being redefined.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 3d2cd96..f4439dc 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -1139,10 +1139,10 @@ class CCompiler(Compiler): delim = '"MESON_GET_DEFINE_DELIMITER"' fargs = {'prefix': prefix, 'define': dname, 'delim': delim} code = ''' + {prefix} #ifndef {define} # define {define} #endif - {prefix} {delim}\n{define}''' args = self._get_compiler_check_args(env, extra_args, dependencies, mode='preprocess').to_native() |