Fixes a MSVC warning (by Vlad Losev); fixes SConscript to work with VC 7.1 and exceptions enabled (by Zhanyong Wan).

This commit is contained in:
zhanyong.wan
2009-03-31 00:03:56 +00:00
parent 755e3bf784
commit 3e54f5a371
3 changed files with 7 additions and 3 deletions

View File

@@ -121,6 +121,11 @@ platform = env_with_exceptions['PLATFORM']
if platform == 'win32':
env_with_exceptions.Append(CCFLAGS = ['/EHsc'])
env_with_exceptions.Append(CPPDEFINES = '_HAS_EXCEPTIONS=1')
# Undoes the _TYPEINFO_ hack, which is unnecessary and only creates
# trouble when exceptions are enabled.
cppdefines = env_with_exceptions['CPPDEFINES']
if '_TYPEINFO_' in cppdefines:
cppdefines.remove('_TYPEINFO_')
gtest_ex_obj = env_with_exceptions.Object(target='gtest_ex',
source=gtest_source)