浏览代码

Ignore '/utf-8' flag on vs2013

Windy Darian 6 年之前
父节点
当前提交
bd7aa1b6f6
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      platform/windows/detect.py

+ 3 - 1
platform/windows/detect.py

@@ -195,7 +195,9 @@ def configure_msvc(env, manual_msvc_config):
 
     ## Compile/link flags
 
-    env.AppendUnique(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo', '/utf-8'])
+    env.AppendUnique(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo'])
+    if int(env['MSVC_VERSION'].split('.')[0]) >= 14: #vs2015 and later
+        env.AppendUnique(CCFLAGS=['/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: