chiark / gitweb /
meson: use multiline string syntax (#8214)
authorCaio Marcelo de Oliveira Filho <cmarcelo@gmail.com>
Mon, 19 Feb 2018 09:37:19 +0000 (01:37 -0800)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:58 +0000 (07:58 +0200)
The single quote working with multiple lines is likely to be unintended. With
current versions of meson, it also causes error messages after it to report the
wrong line number. Use the documented syntax instead.

meson.build

index 6d16024c3590eda2d0fbcc780d0ad4003a8f0fd7..b4bb159327516db4c26e1280cc8b52240cc6df55 100644 (file)
@@ -417,7 +417,7 @@ foreach arg : ['unused-parameter',
         endif
 endforeach
 
-if cc.compiles('
+if cc.compiles('''
    #include <time.h>
    #include <inttypes.h>
    typedef uint64_t usec_t;
@@ -426,7 +426,7 @@ if cc.compiles('
            struct timespec now;
            return 0;
    }
-', name : '-Werror=shadow with local shadowing')
+''', name : '-Werror=shadow with local shadowing')
         add_project_arguments('-Werror=shadow', language : 'c')
 endif