meson: don't add_global_arguments when being built as a subproject
authorScott D Phillips <scott.d.phillips@intel.com>
Thu, 27 Oct 2016 05:37:19 +0000 (22:37 -0700)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 11 Nov 2016 15:59:19 +0000 (15:59 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=773568

meson.build

index 7f2dbc0..1ebde0a 100644 (file)
@@ -35,7 +35,9 @@ if cc.get_id() == 'msvc'
   # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
   # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
   # NOTE: Only add warnings here if you are sure they're spurious
-  add_global_arguments('/wd4018', '/wd4244', '/wd4996', language : 'c')
+  if not meson.is_subproject()
+    add_global_arguments('/wd4018', '/wd4244', '/wd4996', language : 'c')
+  endif
   # Disable SAFESEH with MSVC for plugins and libs that use external deps that
   # are built with MinGW
   noseh_link_args = ['/SAFESEH:NO']