--- avida-core/CMakeLists.txt.orig	2012-09-29 03:33:31 UTC
+++ avida-core/CMakeLists.txt
@@ -1,6 +1,6 @@ PROJECT(AVIDA)
 PROJECT(AVIDA)
 
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
 
 
 IF(COMMAND cmake_policy)
@@ -75,10 +75,10 @@ IF(UNIX)
     "-Os ${COMPILER_WARNING_FLAGS} -DNDEBUG"
     CACHE STRING "Flags used by the compiler during release minsize builds." FORCE)
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-    "-O2 -g ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILER_WARNING_FLAGS} -DDEBUG"
+    " -g ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILER_WARNING_FLAGS} -DDEBUG"
     CACHE STRING "Flags used by the compiler during release builds." FORCE)
   SET(CMAKE_CXX_FLAGS_RELEASE
-    "-O3 ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILER_WARNING_FLAGS} -DNDEBUG"
+    " ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILER_WARNING_FLAGS} -DNDEBUG"
     CACHE STRING "Flags used by the compiler during release builds." FORCE)
 ENDIF(UNIX)
 
@@ -408,7 +408,7 @@ IF(AVD_CMDLINE)
     LIST(APPEND AVIDA_CMDLINE_LIBS tcmalloc-1.4)
   ENDIF(AVD_ENABLE_TCMALLOC)  
   IF(NOT MSVC)
-    LIST(APPEND AVIDA_CMDLINE_LIBS pthread)
+    LIST(APPEND AVIDA_CMDLINE_LIBS -pthread)
   ENDIF(NOT MSVC)
   TARGET_LINK_LIBRARIES(avida ${AVIDA_CMDLINE_LIBS})
   
@@ -464,7 +464,7 @@ IF(AVD_GUI_NCURSES)
     
     SET(AVIDA_VIEWER_LIBS avidacore aptostatic ${NCURSES_LIBRARY})
     IF(NOT MSVC)
-      LIST(APPEND AVIDA_VIEWER_LIBS pthread)
+      LIST(APPEND AVIDA_VIEWER_LIBS -pthread)
     ENDIF(NOT MSVC)
     IF(AVD_ENABLE_TCMALLOC)
       LIST(APPEND AVIDA_VIEWER_LIBS tcmalloc-1.4)
@@ -512,7 +512,7 @@ IF(AVD_GUI_PROTOTYPE_TEXT)
     
     SET(AVIDA_TEXT_VIEWER_LIBS avidacore ${NCURSES_LIBRARY})
     IF(NOT MSVC)
-      LIST(APPEND AVIDA_TEXT_VIEWER_LIBS pthread)
+      LIST(APPEND AVIDA_TEXT_VIEWER_LIBS -pthread)
     ENDIF(NOT MSVC)
     IF(AVD_ENABLE_TCMALLOC)
       LIST(APPEND AVIDA_TEXT_VIEWER_LIBS tcmalloc-1.4)
