diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-03-04 11:19:42 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-03-07 00:58:32 +0800 |
commit | 69990918cd566b4e6bbced2788dbfb3db5a4985a (patch) | |
tree | ab4f6fd7b528fc6eaaa574fe397255d83e48bc4f | |
parent | b8524eeb00a43d8cadcd7732ab2472d92f818de0 (diff) | |
download | glibmm-69990918cd566b4e6bbced2788dbfb3db5a4985a.tar.gz |
meson: Use /utf-8 for Visual Studio builds
This way, we can avoid warning/error C4819 when building glibmm due to unicode
handling issues in the compiler, which is likely to pop up on East Asian
locales on Windows.
We need to ignore warning C4828 when building gendef.exe though with this.
-rw-r--r-- | MSVC_NMake/gendef/meson.build | 2 | ||||
-rw-r--r-- | meson.build | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/MSVC_NMake/gendef/meson.build b/MSVC_NMake/gendef/meson.build index 3dc9cc25..5dce0ed6 100644 --- a/MSVC_NMake/gendef/meson.build +++ b/MSVC_NMake/gendef/meson.build @@ -5,5 +5,5 @@ # Used to generate the .def file required to obtain the import .lib file if is_msvc - gendef = executable('gendef', 'gendef.cc', install: false) + gendef = executable('gendef', 'gendef.cc', cpp_args: '/wd4828', install: false) endif diff --git a/meson.build b/meson.build index 366e26e0..16297a8a 100644 --- a/meson.build +++ b/meson.build @@ -189,7 +189,7 @@ add_project_arguments(warning_flags, language: 'cpp') # that should not be overlooked stand out. if is_msvc disabled_warnings = cpp_compiler.get_supported_arguments([ - '/FImsvc_recommended_pragmas.h', '/wd4146', '/wd4267', '/wd4530', '/wd4589' + '/FImsvc_recommended_pragmas.h', '/wd4146', '/wd4267', '/wd4530', '/wd4589', '/utf-8' ]) add_project_arguments(disabled_warnings, language: 'cpp') endif |