meson: error out if platforms contains empty string
authorTapani Pälli <tapani.palli@intel.com>
Tue, 18 Jun 2019 10:50:52 +0000 (13:50 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 24 Jun 2019 05:40:18 +0000 (08:40 +0300)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110939
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
meson.build

index d8a48bd..31bb0dd 100644 (file)
@@ -278,6 +278,10 @@ with_platform_surfaceless = _platforms.contains('surfaceless')
 
 with_platforms = false
 if _platforms.length() != 0 and _platforms != ['']
+  # sanity check that list contains no empty strings
+  if _platforms.contains('')
+    error('Invalid argument list given to -Dplatforms, please fix.')
+  endif
   with_platforms = true
   egl_native_platform = _platforms[0]
 endif