[gnome-todo/wip/sadiq/fixes] build: Simplify checking supported compiler flags



commit af5e137c8cb4bc17747b2a7d944cac11ef9407b6
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Mon Feb 4 18:08:25 2019 +0530

    build: Simplify checking supported compiler flags

 meson.build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 0c8931d..ff5be68 100644
--- a/meson.build
+++ b/meson.build
@@ -134,11 +134,7 @@ if gnome_todo_debug
     '-Wno-error=missing-field-initializers', '-Wno-missing-field-initializers',
   ]
 
-  foreach cflag: test_cflags
-    if cc.has_argument(cflag)
-      compiler_flags += [cflag]
-    endif
-  endforeach
+  compiler_flags += cc.get_supported_arguments(test_cflags)
 endif
 
 add_project_arguments(common_flags + compiler_flags, language: 'c')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]