diff options
author | Aaron C. Meadows <corwin@shadowguarddev.com> | 2012-02-16 21:27:05 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-02-17 16:30:23 (GMT) |
commit | ba89e92ba622ed821a6adf31e8a6633d574ff656 (patch) | |
tree | 5821617cc9832315cd7c58e8082259e7a07cbd8a /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | e2042b68d36e0881bfc00f926a275dda3d6cbc9d (diff) | |
download | CMake-ba89e92ba622ed821a6adf31e8a6633d574ff656.zip CMake-ba89e92ba622ed821a6adf31e8a6633d574ff656.tar.gz CMake-ba89e92ba622ed821a6adf31e8a6633d574ff656.tar.bz2 |
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.
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 41230e7..9369af6 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -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) |