[gtkmm/meson-msvc-warnings-3-24] Meson: Simplify compiler flag checking



commit ca657b6df2642b80f87d9841017344fd5701955e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue May 24 14:49:51 2022 +0800

    Meson: Simplify compiler flag checking
    
    As Kjell suggested, don't use a for loop as get_supported_arguments() works on
    a list and returns a list.

 meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7d07eebd..feb8be4f 100644
--- a/meson.build
+++ b/meson.build
@@ -379,10 +379,10 @@ if is_msvc
   # 'var' : conversion from 'size_t' to 'type', possible loss of data (applies on 64-bit builds)
     disable_warnings_list += '/wd4267'
   endif
-  foreach wd : disable_warnings_list
-    disabled_warning = cpp_compiler.get_supported_arguments(wd)
-    add_project_arguments(disabled_warning, language: ['cpp', 'c'])
-  endforeach
+  add_project_arguments(
+    cpp_compiler.get_supported_arguments(disable_warnings_list),
+    language: ['cpp', 'c']
+  )
   gui_app_ldflags += '-entry:mainCRTStartup'
 endif
 


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