summaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-22 23:29:24 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-22 23:29:24 (GMT)
commitef29ce3576240e51f289e49b2c4e156b414d6685 (patch)
tree95c58a804755fd419d101af9c27c59f5603f25fe /scons
parent046efb852bef27fe2a22dc632fdaeb909d5b0086 (diff)
downloadgoogletest-ef29ce3576240e51f289e49b2c4e156b414d6685.zip
googletest-ef29ce3576240e51f289e49b2c4e156b414d6685.tar.gz
googletest-ef29ce3576240e51f289e49b2c4e156b414d6685.tar.bz2
Turns on exceptions when compiling gtest_output_test (by Vlad Losev); moves TestCase to gtest.h to prepare for the event listener API (by Vlad Losev).
Diffstat (limited to 'scons')
-rw-r--r--scons/SConscript6
1 files changed, 4 insertions, 2 deletions
diff --git a/scons/SConscript b/scons/SConscript
index d591810..2fa519b 100644
--- a/scons/SConscript
+++ b/scons/SConscript
@@ -113,11 +113,13 @@ env_with_exceptions = env.Clone()
if env_with_exceptions['PLATFORM'] == 'win32':
env_with_exceptions.Append(CCFLAGS=['/EHsc'])
env_with_exceptions.Append(CPPDEFINES='_HAS_EXCEPTIONS=1')
+ cppdefines = env_with_exceptions['CPPDEFINES']
# 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_')
+ if '_HAS_EXCEPTIONS=0' in cppdefines:
+ cppdefines.remove('_HAS_EXCEPTIONS=0')
else:
env_with_exceptions.Append(CCFLAGS='-fexceptions')
ccflags = env_with_exceptions['CCFLAGS']
@@ -287,7 +289,6 @@ GtestTest(env, 'gtest-typed-test_test', gtest_main,
additional_sources=['../test/gtest-typed-test2_test.cc'])
GtestTest(env, 'gtest-param-test_test', gtest,
additional_sources=['../test/gtest-param-test2_test.cc'])
-GtestTest(env, 'gtest_output_test_', gtest)
GtestTest(env, 'gtest_color_test_', gtest)
GtestTest(env, 'gtest-linked_ptr_test', gtest_main)
GtestTest(env, 'gtest-port_test', gtest_main)
@@ -305,6 +306,7 @@ GtestBinary(env, 'gtest_unittest', gtest_main, [gtest_unittest_obj])
############################################################
# Tests targets using custom environments.
+GtestTest(env_with_exceptions, 'gtest_output_test_', gtest_ex)
GtestTest(env_with_exceptions, 'gtest_throw_on_failure_ex_test', gtest_ex)
GtestTest(env_with_threads, 'gtest-death-test_test', gtest_main)
GtestTest(env_with_less_optimization, 'gtest_env_var_test_', gtest)