summaryrefslogtreecommitdiff
path: root/giscanner/meson.build
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-30 16:07:39 +0800
committerChristoph Reiter <reiter.christoph@gmail.com>2019-05-03 20:52:43 +0000
commit76396d4c23588fb4f225d3d5977af6c0ff056e71 (patch)
tree15e2073a41fac76a454a29bde6a2b54fdae95249 /giscanner/meson.build
parentd16021274d8e7f82a25ec0cbd97f2d193f37e2c8 (diff)
downloadgobject-introspection-76396d4c23588fb4f225d3d5977af6c0ff056e71.tar.gz
build: Force-include msvc_recommended_pragmas.h on Visual Studio
By doing so, we essentially cover the various compiler flags that we want to use for non-Visual Studio builds to check for warnings that might cause real concern. This also skips the checks for the various GCC-isque CFlag checks that are scattered in the various build files on Visual Studio builds, since they are essentially meaningless on Visual Studio builds.
Diffstat (limited to 'giscanner/meson.build')
-rw-r--r--giscanner/meson.build12
1 files changed, 8 insertions, 4 deletions
diff --git a/giscanner/meson.build b/giscanner/meson.build
index 6ae34067..67c043d0 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -82,10 +82,14 @@ if not cc.has_header('unistd.h')
giscanner_args += '-DYY_NO_UNISTD_H'
endif
-custom_c_args = cc.get_supported_arguments([
- '-Wno-missing-field-initializers',
- '-Wno-unused-parameter',
-])
+custom_c_args = []
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-missing-field-initializers',
+ '-Wno-unused-parameter',
+ ])
+endif
+
giscanner_lib = static_library('giscanner',
sources: [
'sourcescanner.c',