[glibmm/glibmm-master-use-dllexport: 1/6] meson: Use /utf-8 for Visual Studio builds



commit 097564e4a84d43adfc82bcb434c79a5960a8de0f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Mar 4 11:19:42 2020 +0800

    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.

 MSVC_NMake/gendef/meson.build | 2 +-
 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 945fbdaa..29a0b1b5 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', '/wd4267', '/wd4530', '/wd4589'
+    '/FImsvc_recommended_pragmas.h', '/wd4267', '/wd4530', '/wd4589', '/utf-8'
   ])
   add_project_arguments(disabled_warnings, language: 'cpp')
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]