[gnome-bluetooth: 4/14] build: Avoid extra variable on compiler flag checking



commit 560dbd92b676e9b41801d4512bc8881aa37d665f
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Thu Dec 20 13:22:04 2018 +0100

    build: Avoid extra variable on compiler flag checking
    
    The use of an extra variable can be avoided and still maintain
    readibility when checking compiler flags, so the build commands
    have been changed.

 meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1c3b19d2..8e380bb4 100644
--- a/meson.build
+++ b/meson.build
@@ -73,7 +73,7 @@ common_flags = [
 
 compiler_flags = []
 if get_option('buildtype').contains('debug')
-  test_flags = [
+  compiler_flags += cc.get_supported_arguments([
     '-Werror=format=2',
     '-Werror=implicit-function-declaration',
     '-Werror=init-self',
@@ -83,9 +83,7 @@ if get_option('buildtype').contains('debug')
     '-Werror=return-type',
     '-Wnested-externs',
     '-Wstrict-prototypes',
-  ]
-
-  compiler_flags += cc.get_supported_arguments(test_flags)
+  ])
 endif
 
 add_project_arguments(common_flags + compiler_flags, language: 'c')


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