summaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/meson.build19
-rw-r--r--tests/scanner/meson.build21
2 files changed, 26 insertions, 14 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 9c7c0765..369abac8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -65,9 +65,13 @@ test_everything_files = custom_target('everything',
test_everything_headers = [test_everything_files[0]]
test_everything_sources = [test_everything_files[1]]
-custom_c_args = cc.get_supported_arguments([
- '-Wno-unused-parameter',
-])
+custom_c_args = []
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-unused-parameter',
+ ])
+endif
+
everything_lib = shared_library('everything-1.0',
sources: test_everything_sources,
include_directories : configinc,
@@ -76,9 +80,12 @@ everything_lib = shared_library('everything-1.0',
version: '1.0.0',
)
-custom_c_args = cc.get_supported_arguments([
- '-Wno-unused-parameter',
-])
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-unused-parameter',
+ ])
+endif
+
gimarshallingtests_lib = shared_library('gimarshallingtests-1.0',
sources: test_marshalling_sources,
include_directories : configinc,
diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build
index ef459bbd..a028e3d2 100644
--- a/tests/scanner/meson.build
+++ b/tests/scanner/meson.build
@@ -23,9 +23,12 @@ endforeach
test_girs = []
test_typelibs = []
-custom_c_args = cc.get_supported_arguments([
- '-Wno-unused-parameter',
-])
+custom_c_args = []
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-unused-parameter',
+ ])
+endif
typedef_lib = shared_library('typedef-1.0',
sources: ['typedefs.c'],
@@ -76,11 +79,13 @@ barapp_lib = shared_library('barapp-1.0',
dependencies: [gobject_dep, girepo_dep],
)
-custom_c_args = cc.get_supported_arguments([
- '-Wno-unused-parameter',
- '-Wno-old-style-definition',
- '-Wno-missing-field-initializers',
-])
+if cc.get_id() != 'msvc'
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-unused-parameter',
+ '-Wno-old-style-definition',
+ '-Wno-missing-field-initializers',
+ ])
+endif
if with_cairo
regress_deps = [cairo_dep, cairo_gobject_dep]