summaryrefslogtreecommitdiff
path: root/girepository/cmph
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-30 16:07:39 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-04-30 16:07:39 +0800
commit26f542484ebe88ef231ff36e8853f806dd7ecfd3 (patch)
tree36e432b7c16af7aefbac98cbb6a52dcf51091979 /girepository/cmph
parentd2faab30b91ae54fb82bd4b964b9ef7df9e8dd60 (diff)
downloadgobject-introspection-26f542484ebe88ef231ff36e8853f806dd7ecfd3.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 'girepository/cmph')
-rw-r--r--girepository/cmph/meson.build38
1 files changed, 23 insertions, 15 deletions
diff --git a/girepository/cmph/meson.build b/girepository/cmph/meson.build
index d7b1e423..5bc41a33 100644
--- a/girepository/cmph/meson.build
+++ b/girepository/cmph/meson.build
@@ -29,17 +29,22 @@ cmph_deps = [
cc.find_library('m', required: false),
]
-custom_c_args = cc.get_supported_arguments([
- '-Wno-implicit-fallthrough',
- '-Wno-old-style-definition',
- '-Wno-suggest-attribute=noreturn',
- '-Wno-type-limits',
- '-Wno-undef',
- '-Wno-unused-parameter',
- '-Wno-cast-align',
- '-Wno-unused-function',
- '-Wno-return-type',
-])
+custom_c_args = []
+
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-implicit-fallthrough',
+ '-Wno-old-style-definition',
+ '-Wno-suggest-attribute=noreturn',
+ '-Wno-type-limits',
+ '-Wno-undef',
+ '-Wno-unused-parameter',
+ '-Wno-cast-align',
+ '-Wno-unused-function',
+ '-Wno-return-type',
+ ])
+endif
+
cmph = static_library('cmph',
sources: cmph_sources,
c_args: gi_hidden_visibility_cflags + custom_c_args,
@@ -51,10 +56,13 @@ cmph_dep = declare_dependency(
include_directories: include_directories('.'),
)
-custom_c_args = cc.get_supported_arguments([
- '-Wno-old-style-definition',
- '-Wno-type-limits',
-])
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-old-style-definition',
+ '-Wno-type-limits',
+ ])
+endif
+
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
dependencies: [
cmph_dep,