diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2019-04-04 15:28:13 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2019-05-16 09:36:59 +0000 |
commit | f80cef5a7dd1fec7714c0c20c7940a8ca1e3a798 (patch) | |
tree | f2796d71758c6c0da5471e4eb55a2e2aa8543641 /meson.build | |
parent | 70128710da23966a1d5f4b2cbcca0ccb63c4d0f1 (diff) | |
download | gvfs-f80cef5a7dd1fec7714c0c20c7940a8ca1e3a798.tar.gz |
build: Use break in foreach loopwip/oholy/meson-version
Since meson 0.49.0, `break` keyword can be used inside loops.
This feature has been used to stop when checking functions in
headers that makes avoiding loop iterations.
[0] http://mesonbuild.com/Release-notes-for-0-49-0.html#foreach-break-and-continue
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 541ab708..c11b0c22 100644 --- a/meson.build +++ b/meson.build @@ -170,7 +170,10 @@ foreach name: ['mkdev', 'sysmacros'] have_major = true header = 'sys/@0@.h'.format(name) foreach func: ['major', 'minor', 'makedev'] - have_major = have_major and cc.has_header_symbol(header, func) + if not cc.has_header_symbol(header, func) + have_major = false + break + endif endforeach config_h.set10('MAJOR_IN_' + name.to_upper(), have_major) |