summaryrefslogtreecommitdiffstats
path: root/scons/SConscript
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-10-01 23:02:59 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-10-01 23:02:59 (GMT)
commit3b1ab7210c88c09a512752710caa6c0a31fc9d24 (patch)
tree814448311d37606fe5051d707a0dda5ffcb56c8f /scons/SConscript
parent95279071b17f9f147c8f627b51984a55c1338e78 (diff)
downloadgoogletest-3b1ab7210c88c09a512752710caa6c0a31fc9d24.zip
googletest-3b1ab7210c88c09a512752710caa6c0a31fc9d24.tar.gz
googletest-3b1ab7210c88c09a512752710caa6c0a31fc9d24.tar.bz2
Refactors the scons script (by Vlad Losev).
Diffstat (limited to 'scons/SConscript')
-rw-r--r--scons/SConscript13
1 files changed, 8 insertions, 5 deletions
diff --git a/scons/SConscript b/scons/SConscript
index 11a105d..26fa5fb 100644
--- a/scons/SConscript
+++ b/scons/SConscript
@@ -95,9 +95,8 @@ import os
############################################################
# Environments for building the targets, sorted by name.
-Import('env')
+Import('env', 'EnvCreator')
-EnvCreator = SConscript('SConstruct.common').EnvCreator
env = EnvCreator.Create(env)
# Note: The relative paths in SConscript files are relative to the location
@@ -114,11 +113,15 @@ env = EnvCreator.Create(env)
env.Prepend(CPPPATH = ['..', '../include'])
env_use_own_tuple = EnvCreator.Create(env, EnvCreator.UseOwnTuple)
-env_warning_ok = EnvCreator.Create(env, EnvCreator.WarningOk)
-env_with_exceptions = EnvCreator.Create(env, EnvCreator.WithExceptions)
env_less_optimized = EnvCreator.Create(env, EnvCreator.LessOptimized)
env_with_threads = EnvCreator.Create(env, EnvCreator.WithThreads)
-env_without_rtti = EnvCreator.Create(env, EnvCreator.NoRtti)
+# The following environments are used to compile gtest_unittest.cc, which
+# triggers a warning in all but the most recent GCC versions when compiling
+# the EXPECT_EQ(NULL, ptr) statement.
+env_warning_ok = EnvCreator.Create(env, EnvCreator.WarningOk)
+env_with_exceptions = EnvCreator.Create(env_warning_ok,
+ EnvCreator.WithExceptions)
+env_without_rtti = EnvCreator.Create(env_warning_ok, EnvCreator.NoRtti)
############################################################
# Helpers for creating build targets.