summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-22 19:31:32 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-22 19:31:32 (GMT)
commit6838ea0d6e566050b49f8aff46bda85442945826 (patch)
tree1580fbeea77dc648461bf16c25aab0441b1a4b73
parent181814572bf67d603d56a52a6fe3e12a2344c395 (diff)
downloadswift-contrib-6838ea0d6e566050b49f8aff46bda85442945826.zip
swift-contrib-6838ea0d6e566050b49f8aff46bda85442945826.tar.bz2
Don't compile CppUnit if we're not testing.
-rw-r--r--3rdParty/CppUnit/SConscript90
-rw-r--r--Slimber/Qt/SConscript1
-rw-r--r--Swift/QtUI/SConscript1
-rw-r--r--Swiften/Examples/ConnectivityTest/SConscript1
-rw-r--r--Swiften/Examples/SendMessage/SConscript1
5 files changed, 46 insertions, 48 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)
diff --git a/Slimber/Qt/SConscript b/Slimber/Qt/SConscript
index b2b8320..c2e203c 100644
--- a/Slimber/Qt/SConscript
+++ b/Slimber/Qt/SConscript
@@ -6,7 +6,6 @@ myenv = env.Clone()
myenv.MergeFlags(env["SLIMBER_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
-myenv.MergeFlags(env["CPPUNIT_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 151cc3a..af7dd68 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -27,7 +27,6 @@ if myenv["HAVE_XSS"] :
if myenv["HAVE_SPARKLE"] :
myenv.MergeFlags(env["SPARKLE_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
-myenv.MergeFlags(env["CPPUNIT_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["SQLITE_FLAGS"])
diff --git a/Swiften/Examples/ConnectivityTest/SConscript b/Swiften/Examples/ConnectivityTest/SConscript
index 7a943dc..55a0b36 100644
--- a/Swiften/Examples/ConnectivityTest/SConscript
+++ b/Swiften/Examples/ConnectivityTest/SConscript
@@ -2,7 +2,6 @@ Import("env")
myenv = env.Clone()
myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
-myenv.MergeFlags(myenv["CPPUNIT_FLAGS"])
myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
myenv.MergeFlags(myenv["BOOST_FLAGS"])
myenv.MergeFlags(myenv["SQLITE_FLAGS"])
diff --git a/Swiften/Examples/SendMessage/SConscript b/Swiften/Examples/SendMessage/SConscript
index 0e0197e..c3f325e 100644
--- a/Swiften/Examples/SendMessage/SConscript
+++ b/Swiften/Examples/SendMessage/SConscript
@@ -2,7 +2,6 @@ Import("env")
myenv = env.Clone()
myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
-myenv.MergeFlags(myenv["CPPUNIT_FLAGS"])
myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
myenv.MergeFlags(myenv["BOOST_FLAGS"])
myenv.MergeFlags(myenv["SQLITE_FLAGS"])