aboutsummaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-04-24 00:26:25 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-04-24 00:26:25 +0000
commitf2d0d0e3d56794855d1e9a1f157457b7225e8c88 (patch)
treec31ceb2e69ca6e51ebef7a3978bd7d7f900db6a1 /scons
parentf204cd89e591e8cda022f4b471962c8556e19b8c (diff)
downloadgoogletest-f2d0d0e3d56794855d1e9a1f157457b7225e8c88.tar.gz
googletest-f2d0d0e3d56794855d1e9a1f157457b7225e8c88.tar.bz2
googletest-f2d0d0e3d56794855d1e9a1f157457b7225e8c88.zip
Renames the POSIX wrappers (by Zhanyong Wan) and adds more targets to SConscript (by Vlad Losev).
Diffstat (limited to 'scons')
-rw-r--r--scons/SConscript41
1 files changed, 22 insertions, 19 deletions
diff --git a/scons/SConscript b/scons/SConscript
index 6a7cc137..21b5ab5a 100644
--- a/scons/SConscript
+++ b/scons/SConscript
@@ -131,6 +131,10 @@ gtest_ex_obj = env_with_exceptions.Object(target='gtest_ex',
gtest_main_ex_obj = env_with_exceptions.Object(target='gtest_main_ex',
source=gtest_main_source)
+gtest_ex = env_with_exceptions.StaticLibrary(
+ target='gtest_ex',
+ source=gtest_ex_obj)
+
gtest_ex_main = env_with_exceptions.StaticLibrary(
target='gtest_ex_main',
source=gtest_ex_obj + gtest_main_ex_obj)
@@ -204,14 +208,24 @@ GtestUnitTest(env, 'gtest_output_test_', gtest)
GtestUnitTest(env, 'gtest_color_test_', gtest)
GtestUnitTest(env, 'gtest-linked_ptr_test', gtest_main)
GtestUnitTest(env, 'gtest-port_test', gtest_main)
-
-env_with_pthread = env.Clone()
-if env_with_pthread['PLATFORM'] not in ['win32', 'darwin']:
- # Assuming POSIX-like environment with GCC.
- env_with_pthread.Append(CCFLAGS = ['-pthread'])
- env_with_pthread.Append(LINKFLAGS = ['-pthread'])
-
-GtestUnitTest(env_with_pthread, 'gtest-death-test_test', gtest_main)
+GtestUnitTest(env, 'gtest_break_on_failure_unittest_', gtest)
+GtestUnitTest(env, 'gtest_filter_unittest_', gtest)
+GtestUnitTest(env, 'gtest_help_test_', gtest_main)
+GtestUnitTest(env, 'gtest_list_tests_unittest_', gtest)
+GtestUnitTest(env, 'gtest_throw_on_failure_test_', gtest)
+GtestUnitTest(env_with_exceptions, 'gtest_throw_on_failure_ex_test', gtest_ex)
+GtestUnitTest(env, 'gtest_xml_outfile1_test_', gtest_main)
+GtestUnitTest(env, 'gtest_xml_outfile2_test_', gtest_main)
+GtestUnitTest(env, 'gtest_xml_output_unittest_', gtest_main)
+
+# Assuming POSIX-like environment with GCC.
+# TODO(vladl@google.com): sniff presence of pthread_atfork instead of
+# selecting on a platform.
+env_with_threads = env.Clone()
+if env_with_threads['PLATFORM'] != 'win32':
+ env_with_threads.Append(CCFLAGS = ['-pthread'])
+ env_with_threads.Append(LINKFLAGS = ['-pthread'])
+GtestUnitTest(env_with_threads, 'gtest-death-test_test', gtest_main)
gtest_unittest_ex_obj = env_with_exceptions.Object(
target='gtest_unittest_ex',
@@ -221,17 +235,6 @@ GtestBinary(env_with_exceptions,
gtest_ex_main,
gtest_unittest_ex_obj)
-# TODO(wan@google.com) Add these unit tests:
-# - gtest_break_on_failure_unittest_
-# - gtest_filter_unittest_
-# - gtest_help_test_
-# - gtest_list_tests_unittest_
-# - gtest_throw_on_failure_ex_test
-# - gtest_throw_on_failure_test_
-# - gtest_xml_outfile1_test_
-# - gtest_xml_outfile2_test_
-# - gtest_xml_output_unittest_
-
# We need to disable some optimization flags for some tests on
# Windows; otherwise the redirection of stdout does not work
# (apparently because of a compiler bug).