summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/meson.build8
-rw-r--r--meson.build2
2 files changed, 8 insertions, 2 deletions
diff --git a/examples/meson.build b/examples/meson.build
index adc0e68..bc948b6 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -13,6 +13,12 @@ examples = [
[['text'], 'user-font', ['user-font.cc']],
]
+if is_msvc
+ ex_disabled_warnings = cpp_compiler.get_supported_arguments('/wd4127')
+else
+ ex_disabled_warnings = []
+endif
+
foreach ex : examples
dir = ''
foreach dir_part : ex[0]
@@ -25,7 +31,7 @@ foreach ex : examples
endforeach
executable(ex_name, ex_sources,
- cpp_args: '-DCAIROMM_DISABLE_DEPRECATED',
+ cpp_args: [ '-DCAIROMM_DISABLE_DEPRECATED' ] + ex_disabled_warnings,
dependencies: cairomm_own_dep,
implicit_include_directories: false,
gui_app: false,
diff --git a/meson.build b/meson.build
index c3ba43e..c7f12ef 100644
--- a/meson.build
+++ b/meson.build
@@ -221,7 +221,7 @@ msvc14x_toolset_ver = ''
# MSVC: Ignore warnings that aren't really harmful, but make those
# that should not be overlooked stand out.
if is_msvc
- foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4251', '/wd4267', '/wd4275', '/wd4530', '/utf-8']
+ foreach wd : ['/FImsvc_recommended_pragmas.h', '/wd4267', '/wd4800', '/utf-8']
disabled_warning = cpp_compiler.get_supported_arguments(wd)
add_project_arguments(disabled_warning, language: 'cpp')
endforeach