From 97f116d36bdc8a335f26eebb70a7480d96536ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 8 Oct 2020 10:49:33 +0200 Subject: SCons: Refactor and cleanup warnings definition --- platform/uwp/detect.py | 3 +++ platform/windows/detect.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'platform') diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index a7ca26c16c..6e57dbbf64 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -80,6 +80,9 @@ def configure(env): env["ENV"] = os.environ vc_base_path = os.environ["VCTOOLSINSTALLDIR"] if "VCTOOLSINSTALLDIR" in os.environ else os.environ["VCINSTALLDIR"] + # Force to use Unicode encoding + env.Append(MSVC_FLAGS=["/utf-8"]) + # ANGLE angle_root = os.getenv("ANGLE_SRC_PATH") env.Prepend(CPPPATH=[angle_root + "/include"]) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 63f31307e7..d5474ace9c 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -222,8 +222,8 @@ def configure_msvc(env, manual_msvc_config): ## Compile/link flags env.AppendUnique(CCFLAGS=["/MT", "/Gd", "/GR", "/nologo"]) - if int(env["MSVC_VERSION"].split(".")[0]) >= 14: # vs2015 and later - env.AppendUnique(CCFLAGS=["/utf-8"]) + # Force to use Unicode encoding + env.Append(MSVC_FLAGS=["/utf-8"]) env.AppendUnique(CXXFLAGS=["/TP"]) # assume all sources are C++ if manual_msvc_config: # should be automatic if SCons found it if os.getenv("WindowsSdkDir") is not None: -- cgit v1.2.3