From 3b1ab7210c88c09a512752710caa6c0a31fc9d24 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Thu, 1 Oct 2009 23:02:59 +0000 Subject: Refactors the scons script (by Vlad Losev). --- scons/SConscript | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'scons/SConscript') diff --git a/scons/SConscript b/scons/SConscript index 11a105dd..26fa5fbf 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. -- cgit v1.2.3