diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-04-22 19:31:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-04-22 19:31:32 (GMT) |
commit | 6838ea0d6e566050b49f8aff46bda85442945826 (patch) | |
tree | 1580fbeea77dc648461bf16c25aab0441b1a4b73 /3rdParty | |
parent | 181814572bf67d603d56a52a6fe3e12a2344c395 (diff) | |
download | swift-contrib-6838ea0d6e566050b49f8aff46bda85442945826.zip swift-contrib-6838ea0d6e566050b49f8aff46bda85442945826.tar.bz2 |
Don't compile CppUnit if we're not testing.
Diffstat (limited to '3rdParty')
-rw-r--r-- | 3rdParty/CppUnit/SConscript | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/3rdParty/CppUnit/SConscript b/3rdParty/CppUnit/SConscript index 95109e1..bdcea88 100644 --- a/3rdParty/CppUnit/SConscript +++ b/3rdParty/CppUnit/SConscript @@ -1,55 +1,57 @@ Import("env") +if env["TEST"] : + ################################################################################ # Module flags ################################################################################ -if env["SCONS_STAGE"] == "flags" : - env["CPPUNIT_FLAGS"] = { - "CPPPATH": [env.Dir("src/include"), env.Dir(".")], - "LIBPATH": [env.Dir(".")], - "LIBS": ["CppUnit"] - } + if env["SCONS_STAGE"] == "flags" : + env["CPPUNIT_FLAGS"] = { + "CPPPATH": [env.Dir("src/include"), env.Dir(".")], + "LIBPATH": [env.Dir(".")], + "LIBS": ["CppUnit"] + } ################################################################################ # Build ################################################################################ -if env["SCONS_STAGE"] == "build" : - myenv = env.Clone() - myenv.Append(CPPPATH = ["src/include", "."]) - sources = [ - "src/src/cppunit/TextTestRunner.cpp", - "src/src/cppunit/TextTestProgressListener.cpp", - "src/src/cppunit/BriefTestProgressListener.cpp", - "src/src/cppunit/TextOutputter.cpp", - "src/src/cppunit/XmlOutputter.cpp", - "src/src/cppunit/XmlElement.cpp", - "src/src/cppunit/XmlDocument.cpp", - "src/src/cppunit/StringTools.cpp", - "src/src/cppunit/DefaultProtector.cpp", - "src/src/cppunit/Protector.cpp", - "src/src/cppunit/ProtectorChain.cpp", - "src/src/cppunit/SynchronizedObject.cpp", - "src/src/cppunit/SourceLine.cpp", - "src/src/cppunit/TestRunner.cpp", - "src/src/cppunit/TestFactoryRegistry.cpp", - "src/src/cppunit/TestSuite.cpp", - "src/src/cppunit/TestSuiteBuilderContext.cpp", - "src/src/cppunit/TestResult.cpp", - "src/src/cppunit/TestResultCollector.cpp", - "src/src/cppunit/TestSuccessListener.cpp", - "src/src/cppunit/TestComposite.cpp", - "src/src/cppunit/TestCase.cpp", - "src/src/cppunit/TestFailure.cpp", - "src/src/cppunit/TestLeaf.cpp", - "src/src/cppunit/TestNamer.cpp", - "src/src/cppunit/Asserter.cpp", - "src/src/cppunit/TypeInfoHelper.cpp", - "src/src/cppunit/Exception.cpp", - "src/src/cppunit/Message.cpp", - "src/src/cppunit/AdditionalMessage.cpp", - "src/src/cppunit/Test.cpp", - "src/src/cppunit/TestPath.cpp" - ] - myenv.StaticLibrary("CppUnit", sources) + if env["SCONS_STAGE"] == "build" : + myenv = env.Clone() + myenv.Append(CPPPATH = ["src/include", "."]) + sources = [ + "src/src/cppunit/TextTestRunner.cpp", + "src/src/cppunit/TextTestProgressListener.cpp", + "src/src/cppunit/BriefTestProgressListener.cpp", + "src/src/cppunit/TextOutputter.cpp", + "src/src/cppunit/XmlOutputter.cpp", + "src/src/cppunit/XmlElement.cpp", + "src/src/cppunit/XmlDocument.cpp", + "src/src/cppunit/StringTools.cpp", + "src/src/cppunit/DefaultProtector.cpp", + "src/src/cppunit/Protector.cpp", + "src/src/cppunit/ProtectorChain.cpp", + "src/src/cppunit/SynchronizedObject.cpp", + "src/src/cppunit/SourceLine.cpp", + "src/src/cppunit/TestRunner.cpp", + "src/src/cppunit/TestFactoryRegistry.cpp", + "src/src/cppunit/TestSuite.cpp", + "src/src/cppunit/TestSuiteBuilderContext.cpp", + "src/src/cppunit/TestResult.cpp", + "src/src/cppunit/TestResultCollector.cpp", + "src/src/cppunit/TestSuccessListener.cpp", + "src/src/cppunit/TestComposite.cpp", + "src/src/cppunit/TestCase.cpp", + "src/src/cppunit/TestFailure.cpp", + "src/src/cppunit/TestLeaf.cpp", + "src/src/cppunit/TestNamer.cpp", + "src/src/cppunit/Asserter.cpp", + "src/src/cppunit/TypeInfoHelper.cpp", + "src/src/cppunit/Exception.cpp", + "src/src/cppunit/Message.cpp", + "src/src/cppunit/AdditionalMessage.cpp", + "src/src/cppunit/Test.cpp", + "src/src/cppunit/TestPath.cpp" + ] + myenv.StaticLibrary("CppUnit", sources) |