summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-12 10:19:33 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-12 10:21:13 (GMT)
commitcc4ce85b1d5a4d0fe47690c2aa0748cc964a6cae (patch)
tree976cacfdd06542a24f22f891e950374ef7508025 /BuildTools/SCons/SConstruct
parent6fc3f55d26748c277ce5f90d2d1cf89ed777a46e (diff)
downloadswift-cc4ce85b1d5a4d0fe47690c2aa0748cc964a6cae.zip
swift-cc4ce85b1d5a4d0fe47690c2aa0748cc964a6cae.tar.bz2
Added SLOCCount to scons.
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r--BuildTools/SCons/SConstruct6
1 files changed, 6 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index feb50d0..a67817a 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -62,6 +62,7 @@ if env["PLATFORM"] == "win32" :
#So we don't need to escalate with UAC
if "TMP" is os.environ.keys() :
env['ENV']['TMP'] = os.environ['TMP']
+env.Tool("SLOCCount", toolpath = ["#/BuildTools/SCons/Tools"])
# Override SConscript to handle tests
oldSConscript = SConscript
@@ -497,6 +498,11 @@ for stage in ["flags", "build", "test"] :
env["SCONS_STAGE"] = stage
SConscript(dirs = map(lambda x : "#/" + x, modules))
+# SLOCCount
+if ARGUMENTS.get("sloccount", False) :
+ for project in env["PROJECTS"] :
+ env.SLOCCount("#/" + project)
+
################################################################################
# Print summary
################################################################################