https://github.com/Kitware/CMake
Raw File
Tip revision: 74c99d11bc62048a069bd6c89b48cf4f94884210 authored by Brad King on 26 June 2015, 12:44:27 UTC
CMake 3.3.0-rc3
Tip revision: 74c99d1
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