[Avida-cvs] [avida-svn] r675 - in development: . source source/platform source/platform/tcmalloc source/targets/avida source/targets/avida-viewer support/utils/AvidaUtils
kaben@myxo.css.msu.edu
kaben at myxo.css.msu.edu
Mon May 8 18:38:54 PDT 2006
Author: kaben
Date: 2006-05-08 21:38:54 -0400 (Mon, 08 May 2006)
New Revision: 675
Added:
development/source/platform/SConscript
development/source/platform/tcmalloc/SConscript
Modified:
development/SConstruct
development/source/SConscript
development/source/targets/avida-viewer/CMakeLists.txt
development/source/targets/avida-viewer/SConscript
development/source/targets/avida/SConscript
development/support/utils/AvidaUtils/PlatformTool.py
Log:
Updated ncurses viewer to support recent code changes.
Updated SCons build to support recent code changes.
Modified: development/SConstruct
===================================================================
--- development/SConstruct 2006-05-09 01:03:36 UTC (rev 674)
+++ development/SConstruct 2006-05-09 01:38:54 UTC (rev 675)
@@ -31,6 +31,12 @@
environment.SetDefault(enableSharedPtr = 1)
environment.Append(CPPDEFINES = ['USE_tMemTrack=1', 'ENABLE_UNIT_TESTS=1'])
+if environment['enableTCMalloc'] in ('True', '1', 1):
+ environment.Append(
+ CPPPATH = [ '#/source/platform/tcmalloc', ],
+ LIBPATH = [ '#$buildDir/platform/tcmalloc', ],
+ )
+
environment.Append(
CPPPATH = [
'#/source',
Modified: development/source/SConscript
===================================================================
--- development/source/SConscript 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/SConscript 2006-05-09 01:38:54 UTC (rev 675)
@@ -10,6 +10,7 @@
'drivers/SConscript',
'event/SConscript',
'main/SConscript',
+ 'platform/SConscript',
'targets/SConscript',
'third-party/SConscript',
'tools/SConscript',
Added: development/source/platform/SConscript
===================================================================
--- development/source/platform/SConscript 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/platform/SConscript 2006-05-09 01:38:54 UTC (rev 675)
@@ -0,0 +1,7 @@
+
+Import('environment')
+
+if environment['enableTCMalloc'] in ('True', '1', 1):
+ environment.SConscript('tcmalloc/SConscript')
+
+# vim: set ft=python:
Added: development/source/platform/tcmalloc/SConscript
===================================================================
--- development/source/platform/tcmalloc/SConscript 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/platform/tcmalloc/SConscript 2006-05-09 01:38:54 UTC (rev 675)
@@ -0,0 +1,13 @@
+
+Import('environment')
+
+environment.Library('tcmalloc',
+ [
+ 'system-alloc.cc',
+ 'tcmalloc-logging.cc',
+ 'tcmalloc.cc',
+ ],
+)
+
+
+# vim: set ft=python:
Modified: development/source/targets/avida/SConscript
===================================================================
--- development/source/targets/avida/SConscript 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/targets/avida/SConscript 2006-05-09 01:38:54 UTC (rev 675)
@@ -1,8 +1,6 @@
Import('environment')
-avida = environment.Program('avida',
- 'primitive.cc',
- LIBS = [
+avida_LIBS = [
'main',
'classification',
'cpu',
@@ -13,10 +11,18 @@
'cpu',
'tools',
'actions',
- 'main',
+ 'ncurses',
+ 'pthread',
'archive',
'boost_serialization',
- ],
+ 'main',
+ ]
+if environment['enableTCMalloc'] in ('True', '1', 1):
+ avida_LIBS = avida_LIBS + ['tcmalloc']
+
+avida = environment.Program('avida',
+ 'primitive.cc',
+ LIBS = avida_LIBS,
)
environment.Install('$execPrefix', avida)
Modified: development/source/targets/avida-viewer/CMakeLists.txt
===================================================================
--- development/source/targets/avida-viewer/CMakeLists.txt 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/targets/avida-viewer/CMakeLists.txt 2006-05-09 01:38:54 UTC (rev 675)
@@ -24,43 +24,32 @@
ADD_LIBRARY(cursesviewer ${libviewer_SOURCES})
ADD_EXECUTABLE(avida-viewer viewer.cc)
-IF(MSVC)
-TARGET_LINK_LIBRARIES(avida-viewer
- cursesviewer
- main
- classification
- cpu
- event
- analyze
- drivers
- analyze
- cpu
- main
- tools
- trio
- actions
- ${NCURSES_LIBRARY}
+
+SET(avida_viewer_target_link_libs
+ cursesviewer main classification cpu event analyze drivers analyze cpu tools trio actions ${NCURSES_LIBRARY}
)
-ELSE(MSVC)
-TARGET_LINK_LIBRARIES(avida-viewer
- cursesviewer
- main
- classification
- cpu
- event
- analyze
- drivers
- analyze
- cpu
- main
- tools
- trio
- actions
- ${NCURSES_LIBRARY}
- pthread
+
+
+IF(NOT MSVC)
+ SET(avida_viewer_target_link_libs
+ ${avida_viewer_target_link_libs} pthread
+ )
+ENDIF(NOT MSVC)
+
+IF(AVD_ENABLE_TCMALLOC)
+ SET(avida_viewer_target_link_libs
+ ${avida_viewer_target_link_libs} tcmalloc
+ )
+ENDIF(AVD_ENABLE_TCMALLOC)
+
+SET(avida_viewer_target_link_libs
+ ${avida_viewer_target_link_libs} archive boost_serialization
)
-ENDIF(MSVC)
-LINK_DIRECTORIES(${ALL_LIB_DIRS} ${THIRDPARTY_BLD_DIR}/trio)
+SET(avida_viewer_target_link_libs
+ ${avida_viewer_target_link_libs} main
+)
+TARGET_LINK_LIBRARIES(avida-viewer ${avida_viewer_target_link_libs})
+LINK_DIRECTORIES(${ALL_LIB_DIRS} ${THIRDPARTY_BLD_DIR}/trio)
INSTALL_TARGETS(/work avida-viewer)
Modified: development/source/targets/avida-viewer/SConscript
===================================================================
--- development/source/targets/avida-viewer/SConscript 2006-05-09 01:03:36 UTC (rev 674)
+++ development/source/targets/avida-viewer/SConscript 2006-05-09 01:38:54 UTC (rev 675)
@@ -20,10 +20,7 @@
],
)
-avida_viewer = environment.Program(
- 'avida-viewer',
- 'viewer.cc',
- LIBS = [
+avida_viewer_LIBS = [
'cursesviewer',
'main',
'classification',
@@ -34,10 +31,20 @@
'analyze',
'cpu',
'tools',
- 'main',
+ 'actions',
'ncurses',
'pthread',
- ],
+ 'archive',
+ 'boost_serialization',
+ 'main',
+ ]
+if environment['enableTCMalloc'] in ('True', '1', 1):
+ avida_viewer_LIBS = avida_viewer_LIBS + ['tcmalloc']
+
+avida_viewer = environment.Program(
+ 'avida-viewer',
+ 'viewer.cc',
+ LIBS = avida_viewer_LIBS,
LIBPATH = environment['LIBPATH'] + ['.'],
)
environment.Install('$execPrefix', avida_viewer)
Modified: development/support/utils/AvidaUtils/PlatformTool.py
===================================================================
--- development/support/utils/AvidaUtils/PlatformTool.py 2006-05-09 01:03:36 UTC (rev 674)
+++ development/support/utils/AvidaUtils/PlatformTool.py 2006-05-09 01:38:54 UTC (rev 675)
@@ -30,6 +30,9 @@
_PLATFORM_RELEASE_BUILD_FLAGS = "-O3 -ffast-math -DNDEBUG",
_PLATFORM_MINIMUM_RELEASE_BUILD_FLAGS = "-Os -DNDEBUG",
)
+ env.SetDefault(
+ enableTCMalloc = 1,
+ )
def darwin_generate(env):
"""
@@ -354,6 +357,9 @@
plat_default_pysteScriptPath = os.path.join(sys.path[0], '${support_utils_rel_dir}', 'AvidaPyste.py'),
plat_default_pysteScriptCommand = SCons.Util.CLVar('$pythonCommand $pysteScriptPath'),
)
+ env.SetDefault(
+ enableTCMalloc = 0,
+ )
More information about the Avida-cvs
mailing list