Visual Studio: Allow setting Single Byte Character Set (#12189)

For Visual Studio using the Preprocessor Define _SBCS. This behavior
is similar to the way that _UNICODE and _MBCS work already.

Added tests to confirm this behavior.
This commit is contained in:
Aaron C. Meadows
2012-02-16 15:27:05 -06:00
committed by David Cole
parent e2042b68d3
commit ba89e92ba6
7 changed files with 54 additions and 0 deletions
+14
View File
@@ -117,6 +117,20 @@ bool cmVisualStudioGeneratorOptions::UsingUnicode()
}
return false;
}
//----------------------------------------------------------------------------
bool cmVisualStudioGeneratorOptions::UsingSBCS()
{
// Look for the a _SBCS definition.
for(std::vector<std::string>::const_iterator di = this->Defines.begin();
di != this->Defines.end(); ++di)
{
if(*di == "_SBCS")
{
return true;
}
}
return false;
}
//----------------------------------------------------------------------------
void cmVisualStudioGeneratorOptions::Parse(const char* flags)