mirror of
https://github.com/reactos/CMake.git
synced 2024-12-29 23:16:05 +00:00
ba89e92ba6
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.
23 lines
465 B
C++
23 lines
465 B
C++
// Test to verify that _SBCS being defined causes CharacterSet to be set to 0 (Single Byte Character Set)
|
|
|
|
int main ()
|
|
{
|
|
#ifdef _UNICODE
|
|
bool UnicodeSet=true;
|
|
#else
|
|
bool UnicodeSet=false;
|
|
#endif
|
|
|
|
#ifdef _MBCS
|
|
bool MBCSSet=true;
|
|
#else
|
|
bool MBCSSet=false;
|
|
#endif
|
|
|
|
// if neither _UNICODE nor _MBCS is set, CharacterSet must be set to SBCS.
|
|
bool SBCSSet=(!UnicodeSet && !MBCSSet);
|
|
|
|
// Reverse boolean to indicate error case correctly
|
|
return !SBCSSet;
|
|
}
|