https://github.com/Kitware/CMake
Raw File
Tip revision: 4c82f309c59d02899145bc25c0e9efc91a6f64ed authored by Brad King on 10 April 2020, 11:37:32 UTC
CMake 3.16.6
Tip revision: 4c82f30
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