https://github.com/Kitware/CMake
Raw File
Tip revision: bd6389f7bce6d69a75e6f84245834e19b24cc03f authored by Brad King on 11 February 2015, 15:23:38 UTC
CMake 3.1.3
Tip revision: bd6389f
SBCS.cxx
// 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;
}
back to top