瀏覽代碼

VS6: Avoid _MBCS define when _SBCS is defined (#12189)

Should fix the failing SBCS test on the VS6 dashboard.
David Cole 13 年之前
父節點
當前提交
df19b9cadb
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Source/cmLocalVisualStudio6Generator.cxx

+ 5 - 3
Source/cmLocalVisualStudio6Generator.cxx

@@ -1605,11 +1605,13 @@ void cmLocalVisualStudio6Generator
       flagsDebugRel = this->Makefile->GetSafeDefinition(flagVar.c_str());
       flagsDebugRel += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\" ";
       }
-    
-    // if unicode is not found, then add -D_MBCS
+
+    // if _UNICODE and _SBCS are not found, then add -D_MBCS
     std::string defs = this->Makefile->GetDefineFlags();
     if(flags.find("D_UNICODE") == flags.npos &&
-       defs.find("D_UNICODE") == flags.npos) 
+       defs.find("D_UNICODE") == flags.npos &&
+       flags.find("D_SBCS") == flags.npos &&
+       defs.find("D_SBCS") == flags.npos)
       {
       flags += " /D \"_MBCS\"";
       }