msys2: Allow disabling failures on warning
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 14 Dec 2016 00:36:25 +0000 (21:36 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 14 Dec 2016 00:42:11 +0000 (21:42 -0300)
msys2_setup.py
setup.py

index 7aa9e93..ce36f04 100644 (file)
@@ -150,6 +150,8 @@ class Msys2Configurer(GstBuildConfigurer):
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description='Process some integers.')
+    parser.add_argument("--no-error", action='store_true',
+                        default=False, help="Do not error out on warnings")
     parser.add_argument("--reconfigure", action='store_true',
                         default=False, help='Force a full reconfiguration'
                         ' meaning the build/ folder is removed.'
index a05e6ed..38d4f72 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,8 @@ class GstBuildConfigurer:
         self.args = args
 
     def get_configs(self):
+        if self.options.no_error:
+            return []
         return ['--werror']
 
     def configure_meson(self):
@@ -71,6 +73,8 @@ if __name__ == "__main__":
                         ' You can also use `ninja reconfigure` to just'
                         ' make sure meson is rerun but the build folder'
                         ' is kept.')
+    parser.add_argument("--no-error", action='store_true',
+                        default=False, help="Do not error out on warnings")
 
     options, args = parser.parse_known_args()
     configurer = GstBuildConfigurer(options, args)