[Avida-SVN] r1775 - in branches/collect: . source/main tests tests/energy_asex_1000u

blwalker at myxo.css.msu.edu blwalker at myxo.css.msu.edu
Tue Jul 10 10:12:10 PDT 2007


Author: blwalker
Date: 2007-07-10 13:12:10 -0400 (Tue, 10 Jul 2007)
New Revision: 1775

Added:
   branches/collect/tests/_analyze_detail_all/
   branches/collect/tests/energy_asex_1000u/expected/
Modified:
   branches/collect/CMakeLists.txt
   branches/collect/source/main/cPhenotype.cc
Log:

merged development r1770:1771 into collect branch; this fixed the wonkiness of the collect branch's cMakeLists.txt

fixed typo in conflict correction on cPhenotype.cc from r1772

svn copied from development some changes to the test directory that did not get picked up in the r1772 merge.


Modified: branches/collect/CMakeLists.txt
===================================================================
--- branches/collect/CMakeLists.txt	2007-07-10 17:07:53 UTC (rev 1774)
+++ branches/collect/CMakeLists.txt	2007-07-10 17:12:10 UTC (rev 1775)
@@ -38,6 +38,15 @@
     SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing -ftree-vectorize -fvisibility-inlines-hidden")
   ENDIF (CMAKE_CXX_COMPILER MATCHES ".*pathCC.*")
 
+  INCLUDE(CheckCSourceCompiles)
+  SET(CMAKE_REQUIRED_FLAGS "-mno-fused-madd")
+  CHECK_C_SOURCE_COMPILES("int main() { return 0; }" HAVE_FUSED_MADD)
+  SET(CMAKE_REQUIRED_FLAGS "")
+
+  IF(HAVE_FUSED_MADD)
+    SET(COMPILER_OPTIMIZATION_FLAGS "-mno-fused-madd ${COMPILER_OPTIMIZATION_FLAGS}")
+  ENDIF(HAVE_FUSED_MADD)
+
   # Four types of c++ compilations:
   # - debug (Debug)
   # - minimum-size release (MinSizeRel)
@@ -132,6 +141,16 @@
 LIST(APPEND ALL_INC_DIRS ${CLASSIFICATION_DIR})
 
 
+# The core viewer directory
+SET(COREVIEW_DIR ${PROJECT_SOURCE_DIR}/source/viewer-core)
+SET(COREVIEW_SOURCES
+  ${COREVIEW_DIR}/cCoreView_Info.cc
+)
+SOURCE_GROUP(coreview FILES ${COREVIEW_SOURCES})
+LIST(APPEND AVIDA_CORE_SOURCES ${COREVIEW_SOURCES})
+LIST(APPEND ALL_INC_DIRS ${COREVIEW_DIR})
+
+
 # The cpu directory
 SET(CPU_DIR ${PROJECT_SOURCE_DIR}/source/cpu)
 SET(CPU_SOURCES
@@ -212,6 +231,11 @@
 
 # The platform directory
 SET(PLATFORM_DIR ${PROJECT_SOURCE_DIR}/source/platform)
+SET(PLATFORM_SOURCES
+  ${PLATFORM_DIR}/cThread.cc
+  ${PLATFORM_DIR}/PlatformExpert.cc
+)
+LIST(APPEND AVIDA_CORE_SOURCES ${PLATFORM_SOURCES})
 LIST(APPEND ALL_INC_DIRS ${PLATFORM_DIR})
 
 
@@ -246,7 +270,6 @@
   ${TOOLS_DIR}/cStringIterator.cc
   ${TOOLS_DIR}/cStringList.cc
   ${TOOLS_DIR}/cStringUtil.cc
-  ${TOOLS_DIR}/cThread.cc
   ${TOOLS_DIR}/cTools.cc
   ${TOOLS_DIR}/cWeightedIndex.cc
 )
@@ -307,7 +330,7 @@
 ENDIF(AVD_CMDLINE)
 
 
-# By default, build the console interface to Avida.
+# By default, do not build the console interface to Avida.
 OPTION(AVD_GUI_NCURSES
   "Enable building Avida console interface."
   OFF
@@ -369,6 +392,115 @@
 ENDIF(AVD_GUI_NCURSES)
 
 
+
+# By default, do not build the console interface to Avida.
+OPTION(AVD_GUI_PROTO_TEXT
+  "Enable building new Avida text interface."
+  OFF
+)
+# Make sure requisites are present for build of console interface.  Give
+# user feedback if they're missing.
+IF(AVD_GUI_PROTO_TEXT)
+  # Locate the ncurses screen handling package (for Avida's console
+  # interface) and the Qt graphics API (for Avida's graphic interface).
+  INCLUDE(${PROJECT_SOURCE_DIR}/CMakeModules/FindNcurses.cmake)
+  IF(NOT NCURSES_INCLUDE_PATH)
+    MESSAGE("Unable to locate header files for the ncurses CRT screen handling package.  Please set the advanced variable NCURSES_INCLUDE_PATH to their location.")
+  ENDIF(NOT NCURSES_INCLUDE_PATH)
+  IF(NOT NCURSES_LIBRARY)
+    MESSAGE("Unable to locate 'libncurses'.  Please set the advanced variable NCURSES_LIBRARY to its location.")
+  ENDIF(NOT NCURSES_LIBRARY)
+
+  IF(NCURSES_LIBRARY AND NCURSES_INCLUDE_PATH)
+
+    INCLUDE_DIRECTORIES(${NCURSES_INCLUDE_PATH})
+    
+    SET(AVIDA_TEXT_VIEWER_DIR source/targets/viewer-text)
+    SET(AVIDA_TEXT_VIEWER_SOURCES
+#      ${AVIDA_TEXT_VIEWER_DIR}/cAnalyzeScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cAnalyzeView.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cBarScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cEnvironmentScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cHistScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cMapScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cMenuWindow.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cOptionsScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cStatsScreen.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cSymbolUtil.cc
+      ${AVIDA_TEXT_VIEWER_DIR}/cTextWindow.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cView.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cViewInfo.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cZoomScreen.cc
+      ${AVIDA_TEXT_VIEWER_DIR}/cDriver_TextViewer.cc
+#      ${AVIDA_TEXT_VIEWER_DIR}/cTextViewerManager.cc
+      ${AVIDA_TEXT_VIEWER_DIR}/viewer-text.cc
+    )
+    SOURCE_GROUP(targets\\viewer-text FILES ${AVIDA_TEXT_VIEWER_SOURCES})
+    ADD_EXECUTABLE(avida-textview ${AVIDA_TEXT_VIEWER_SOURCES})
+    
+    SET(AVIDA_TEXT_VIEWER_LIBS avidacore ${NCURSES_LIBRARY})
+    IF(NOT MSVC)
+      LIST(APPEND AVIDA_TEXT_VIEWER_LIBS pthread)
+    ENDIF(NOT MSVC)
+    IF(AVD_ENABLE_TCMALLOC)
+      LIST(APPEND AVIDA_TEXT_VIEWER_LIBS tcmalloc)
+    ENDIF(AVD_ENABLE_TCMALLOC)
+    TARGET_LINK_LIBRARIES(avida-textview ${AVIDA_TEXT_VIEWER_LIBS})
+    
+    INSTALL_TARGETS(/work avida-textview)
+
+  ENDIF(NCURSES_LIBRARY AND NCURSES_INCLUDE_PATH)
+ENDIF(AVD_GUI_PROTO_TEXT)
+
+
+
+# By default, do not build the console interface to Avida.
+OPTION(AVD_GUI_PROTO_FLTK
+  "Enable building new Avida FLTK graphical interface."
+  OFF
+)
+# Make sure requisites are present for build of console interface.  Give
+# user feedback if they're missing.
+IF(AVD_GUI_PROTO_FLTK)
+  # Locate the fltk GUI package 
+  INCLUDE(${PROJECT_SOURCE_DIR}/CMakeModules/FindFLTK.cmake)
+  IF(NOT FLTK_INCLUDE_PATH)
+    MESSAGE("Unable to locate header files for the FLTK graphics package.  Please set the advanced variable FLTK_INCLUDE_PATH to their location.")
+  ENDIF(NOT FLTK_INCLUDE_PATH)
+  IF(NOT FLTK_BASE_LIBRARY)
+    MESSAGE("Unable to locate 'fltk.lib'.  Please set the advanced variable FLTK_BASE_LIBRARY to its location.")
+  ENDIF(NOT FLTK_BASE_LIBRARY)
+
+  IF(FLTK_BASE_LIBRARY AND FLTK_INCLUDE_PATH)
+
+    INCLUDE_DIRECTORIES(${FLTK_INCLUDE_PATH})
+    
+    SET(AVIDA_FLTK_VIEWER_DIR source/targets/viewer-fltk)
+    SET(AVIDA_FLTK_VIEWER_SOURCES
+      ${AVIDA_FLTK_VIEWER_DIR}/cDriver_FltkViewer.cc
+      ${AVIDA_FLTK_VIEWER_DIR}/viewer-fltk.cc
+    )
+    SOURCE_GROUP(targets\\viewer-fltk FILES ${AVIDA_FLTK_VIEWER_SOURCES})
+    ADD_EXECUTABLE(avida-fltkview ${AVIDA_FLTK_VIEWER_SOURCES})
+    
+    SET(AVIDA_FLTK_VIEWER_LIBS avidacore ${FLTK_BASE_LIBRARY})
+    IF(NOT MSVC)
+      LIST(APPEND AVIDA_FLTK_VIEWER_LIBS pthread)
+    ENDIF(NOT MSVC)
+    IF(AVD_ENABLE_TCMALLOC)
+      LIST(APPEND AVIDA_FLTK_VIEWER_LIBS tcmalloc)
+    ENDIF(AVD_ENABLE_TCMALLOC)
+    TARGET_LINK_LIBRARIES(avida-fltkview ${AVIDA_FLTK_VIEWER_LIBS})
+    SET_TARGET_PROPERTIES(avida-fltkview PROPERTIES LINK_FLAGS ${FLTK_PLATFORM_DEPENDENT_LIBS})
+
+    INSTALL_TARGETS(/work avida-fltkview)
+
+  ENDIF(FLTK_BASE_LIBRARY AND FLTK_INCLUDE_PATH)
+ENDIF(AVD_GUI_PROTO_FLTK)
+
+
+
 OPTION(AVD_TASK_EVENT_GEN
   "Enable building the task_event_gen utility"
   OFF

Modified: branches/collect/source/main/cPhenotype.cc
===================================================================
--- branches/collect/source/main/cPhenotype.cc	2007-07-10 17:07:53 UTC (rev 1774)
+++ branches/collect/source/main/cPhenotype.cc	2007-07-10 17:12:10 UTC (rev 1775)
@@ -57,7 +57,6 @@
   , promoter_last_inst_terminated(false) 
   , last_task_count(m_world->GetEnvironment().GetNumTasks())
   , last_internal_task_count(m_world->GetEnvironment().GetNumTasks())
-  , last_reaction_add_reward(m_world->GetEnvironment().GetReactionLib().GetSize())  
   , last_task_quality(m_world->GetEnvironment().GetNumTasks())
   , last_task_value(m_world->GetEnvironment().GetNumTasks())
   , last_internal_task_quality(m_world->GetEnvironment().GetNumTasks())

Copied: branches/collect/tests/_analyze_detail_all (from rev 1774, development/tests/_analyze_detail_all)

Copied: branches/collect/tests/energy_asex_1000u/expected (from rev 1774, development/tests/energy_asex_1000u/expected)




More information about the Avida-cvs mailing list