[Avida-SVN] [avida-svn] r1034 - in development: . source source/testsuites support/utils/AvidaUtils
avidaedward at myxo.css.msu.edu
avidaedward at myxo.css.msu.edu
Wed Oct 11 14:17:02 PDT 2006
Author: avidaedward
Date: 2006-10-11 17:17:02 -0400 (Wed, 11 Oct 2006)
New Revision: 1034
Modified:
development/SConstruct
development/source/SConscript
development/source/testsuites/full-unit-tests.cc
development/support/utils/AvidaUtils/CmdLineOpts.py
development/support/utils/AvidaUtils/PlatformTool.py
Log:
Minimal changes supporting avida-extras repository subdirectory (yet to
be created).
Modified: development/SConstruct
===================================================================
--- development/SConstruct 2006-10-10 14:30:30 UTC (rev 1033)
+++ development/SConstruct 2006-10-11 21:17:02 UTC (rev 1034)
@@ -36,9 +36,9 @@
if environment.subst('$enablePyPkg') in ['1', 'yes']:
environment.Append(CPPPATH = ['#/source/bindings/Boost.Python'])
-if environment.subst('$enableTestCode') in ['1', 'yes']:
- environment.SetDefault(enableSharedPtr = 1)
- environment.Append(CPPDEFINES = ['USE_tMemTrack=1', 'ENABLE_UNIT_TESTS=1'])
+if environment.subst('$enableMemTracking') in ['1', 'yes']:
+ #environment.SetDefault(enableSharedPtr = 1)
+ environment.Append(CPPDEFINES = ['USE_tMemTrack=1'])
if environment['enableTCMalloc'] in ('True', '1', 1):
environment.Append(
@@ -67,9 +67,9 @@
'#$buildDir/classification',
'#$buildDir/cpu',
'#$buildDir/drivers',
- '#$buildDir/event',
+ #'#$buildDir/event',
'#$buildDir/main',
- '#$buildDir/third-party/boost/serialization',
+ #'#$buildDir/third-party/boost/serialization',
'#$buildDir/tools',
],
)
@@ -81,6 +81,17 @@
# XXX beginnings of consistency tests. @kgn
environment.SConscript('consistencytests/SConscript', build_dir = 'consistencytest_output')
+# XXX beginnings of 'extras'. @kgn
+#environment.SConscript('../avida-extras/SConscript', build_dir =
+#'../avida-extras/$buildDir')
+
+# XXX beginnings of 'extras'. @kgn
+if environment.subst('$extrasDir') not in ['None', 'none', '']:
+ environment.SConscript(
+ os.path.join(environment.subst('$extrasDir'), 'SConscript'),
+ build_dir = '$extrasBuildDir'
+ )
+
if environment['PLATFORM'] == 'win32':
script_to_build_avida = environment.File(
os.path.join('#', os.path.basename(sys.argv[0]))
Modified: development/source/SConscript
===================================================================
--- development/source/SConscript 2006-10-10 14:30:30 UTC (rev 1033)
+++ development/source/SConscript 2006-10-11 21:17:02 UTC (rev 1034)
@@ -17,8 +17,8 @@
#'utils/SConscript',
] )
-if environment['enableTestCode'] in ('True', '1', 1):
- environment.SConscript('testsuites/SConscript')
+#if environment['enableTestCode'] in ('True', '1', 1):
+# environment.SConscript('testsuites/SConscript')
if environment['enablePyPkg'] in ('True', '1', 1):
environment.SConscript('bindings/Boost.Python/SConscript')
Modified: development/source/testsuites/full-unit-tests.cc
===================================================================
--- development/source/testsuites/full-unit-tests.cc 2006-10-10 14:30:30 UTC (rev 1033)
+++ development/source/testsuites/full-unit-tests.cc 2006-10-11 21:17:02 UTC (rev 1034)
@@ -13,18 +13,18 @@
int main() {
- nChangeList::UnitTests(true);
+// nChangeList::UnitTests(true);
//nBlockStruct::UnitTests(true);
- nDataEntry::UnitTests(true);
- nDataFile::UnitTests(true);
- nFile::UnitTests(true);
+// nDataEntry::UnitTests(true);
+// nDataFile::UnitTests(true);
+// nFile::UnitTests(true);
//nFixedBlock::UnitTests(true);
- nFixedCoords::UnitTests(true);
- nInitFile::UnitTests(true);
- nRandom::UnitTests(true);
- nString::UnitTests(true);
- nStringList::UnitTests(true);
- nTemplateTests::UnitTests(true);
+// nFixedCoords::UnitTests(true);
+// nInitFile::UnitTests(true);
+// nRandom::UnitTests(true);
+// nString::UnitTests(true);
+// nStringList::UnitTests(true);
+// nTemplateTests::UnitTests(true);
return report_errors();
}
Modified: development/support/utils/AvidaUtils/CmdLineOpts.py
===================================================================
--- development/support/utils/AvidaUtils/CmdLineOpts.py 2006-10-10 14:30:30 UTC (rev 1033)
+++ development/support/utils/AvidaUtils/CmdLineOpts.py 2006-10-11 21:17:02 UTC (rev 1034)
@@ -57,10 +57,9 @@
) )
opts.Add(
SCons.Options.BoolOption(
- 'enableTestCode',
- """Set to "1" to build and run test code.""",
- 0
-# '$plat_default_enableTestCode',
+ 'enableMemTracking',
+ """Set to "1" to track creation and deletion of some c++ objects.""",
+ '$plat_default_enableMemTracking',
) )
opts.Add(
SCons.Options.BoolOption(
@@ -79,6 +78,12 @@
# '$plat_default_enableSharedPtr',
#) )
+ opts.Add(
+ 'extrasDir',
+ 'Path to the avida-extras subdirectory.',
+ '$plat_default_extrasDir',
+ )
+
# Store option names and values in the construction env so that any
# user overrides from the command line can be retrieved.
#
@@ -120,19 +125,32 @@
# Make a default build directory name based on values of options 'buildType'
- # and 'enableTestCode'.
+ # and 'enableMemTracking'.
#
default_build_dir = 'build'
if env.subst('$buildType') is not 'None':
default_build_dir += '-' + env.subst('$buildType')
+ if env.subst('$enableMemTracking') in ['yes', '1']:
+ default_build_dir += '-MemTrack'
+ if env.subst('$enableSerialization') in ['yes', '1']:
+ default_build_dir += '-Ser'
# XXX reenable when we have code using its value.
- #if env.subst('$enableTestCode') in ['yes', '1']:
- # default_build_dir += '-Test'
#if env.subst('$enablePyPkg') in ['yes', '1']:
# default_build_dir += '-Py'
#elif env.subst('$enableSharedPtr') in ['yes', '1']:
# default_build_dir += '-ShPtr'
+ extras_build_dir = None
+ if env.subst('$extrasDir') not in ['None', 'none', '']:
+ extras_build_dir = os.path.join(env.subst('$extrasDir'), default_build_dir)
+ opts.Add(
+ 'extrasBuildDir',
+ """Where to place derived build files for avida-extras.
+ - Default is derived from build options.
+ """,
+ extras_build_dir
+ )
+
opts.Add(
'buildDir',
"""Where to place derived build files.
Modified: development/support/utils/AvidaUtils/PlatformTool.py
===================================================================
--- development/support/utils/AvidaUtils/PlatformTool.py 2006-10-10 14:30:30 UTC (rev 1033)
+++ development/support/utils/AvidaUtils/PlatformTool.py 2006-10-11 21:17:02 UTC (rev 1034)
@@ -31,6 +31,7 @@
_PLATFORM_RELEASE_BUILD_FLAGS = "-O3 -ffast-math -DNDEBUG",
_PLATFORM_MINIMUM_RELEASE_BUILD_FLAGS = "-Os -DNDEBUG",
plat_default_enableTCMalloc = 1,
+ plat_default_extrasDir = None,
)
def darwin_generate(env):
@@ -45,9 +46,9 @@
env.SetDefault(
COMPILER_WARNING_FLAGS = "-Wall -Wno-long-double -Wno-long-long",
+ plat_default_enableMemTracking = 0,
+ plat_default_enablePyPkg = 0,
plat_default_enableSerialization = 0,
- plat_default_enableTestCode = 0,
- plat_default_enablePyPkg = 0,
plat_default_enableSharedPtr = 0,
plat_default_pythonCommand = sys.executable,
plat_default_boostIncludeDir = None,
@@ -346,11 +347,12 @@
env.Append(CPPPATH = ['#/source/platform/win32-pthread'])
env.SetDefault(
+ plat_default_enableMemTracking = 0,
+ plat_default_enablePyPkg = 0,
plat_default_enableSerialization = 0,
- plat_default_enableTestCode = 0,
- plat_default_enablePyPkg = 0,
plat_default_enableSharedPtr = 0,
plat_default_enableTCMalloc = 0,
+ plat_default_extrasDir = None,
plat_default_pythonCommand = sys.executable,
plat_default_boostIncludeDir = None,
plat_default_boostPythonLibDir = None,
More information about the Avida-cvs
mailing list