| 1 | Avida 2.3.x |
|---|
| 2 | ---------------------------------------------------------------------- |
|---|
| 3 | Digital Evolution Laboratory at Michigan State University |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | REQUIREMENTS |
|---|
| 7 | ---------------------------------------------------------------------- |
|---|
| 8 | |
|---|
| 9 | In order to build Avida, you must have CMake 2.x installed. |
|---|
| 10 | CMake 2.x is available from http://www.cmake.org |
|---|
| 11 | |
|---|
| 12 | NCurses, in order to build the console viewer. |
|---|
| 13 | |
|---|
| 14 | OR |
|---|
| 15 | |
|---|
| 16 | In Mac OS X, an Xcode project has been provided for building the |
|---|
| 17 | 'primitive' console only version of Avida, as well as the NCurses |
|---|
| 18 | viewer. Xcode 2.1 or greater is required. |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | GETTING STARTED |
|---|
| 22 | ---------------------------------------------------------------------- |
|---|
| 23 | |
|---|
| 24 | To compile and install Avida, all you have to do is run: |
|---|
| 25 | $ ./build_avida |
|---|
| 26 | |
|---|
| 27 | By default, you will get an optimized version of the code, as well as |
|---|
| 28 | the NCurses viewer. The installation goes into a directory called |
|---|
| 29 | 'work' that is created in a subdirectory named 'build' directory. |
|---|
| 30 | See below how to change that. |
|---|
| 31 | |
|---|
| 32 | OR |
|---|
| 33 | |
|---|
| 34 | In Mac OS X's Xcode, click the 'Build' button on the project window. |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | CMAKE CONFIGURATION OPTIONS |
|---|
| 38 | ---------------------------------------------------------------------- |
|---|
| 39 | |
|---|
| 40 | Here are the main options available when configuring and building |
|---|
| 41 | Avida with cmake : |
|---|
| 42 | |
|---|
| 43 | AVD_CONSISTENCY_TEST_PRIMITIVE |
|---|
| 44 | - This is a BOOL, either ON or OFF, to enable primitive consistency |
|---|
| 45 | test suites. |
|---|
| 46 | OFF by default. |
|---|
| 47 | |
|---|
| 48 | AVD_GUI_NCURSES |
|---|
| 49 | - This is a BOOL, either ON or OFF, to enable building Avida console |
|---|
| 50 | interface. |
|---|
| 51 | ON by default. |
|---|
| 52 | |
|---|
| 53 | AVD_PRIMITIVE |
|---|
| 54 | This is a BOOL, either ON or OFF, to enable building interfaceless |
|---|
| 55 | Avida (fastest version). |
|---|
| 56 | ON by default. |
|---|
| 57 | |
|---|
| 58 | AVD_UNIT_TESTS |
|---|
| 59 | - This is a BOOL, either ON or OFF, to enable building primitive |
|---|
| 60 | unit test suites. |
|---|
| 61 | OFF by default. |
|---|
| 62 | |
|---|
| 63 | CMAKE_BUILD_TYPE |
|---|
| 64 | - This is a STRING, one of "None", "Debug", "Release", |
|---|
| 65 | "RelWithDebInfo", "MinSizeRel", to vary optimization levels and |
|---|
| 66 | debugging information in the build. |
|---|
| 67 | "Release" by default. |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | CONFIGURING THE CMAKE BUILD |
|---|
| 72 | ---------------------------------------------------------------------- |
|---|
| 73 | |
|---|
| 74 | There are three ways by which you can set the various options. |
|---|
| 75 | |
|---|
| 76 | |
|---|
| 77 | For a simple 'gui' like interface, from the build directory run: |
|---|
| 78 | $ ccmake ../ |
|---|
| 79 | |
|---|
| 80 | Pressing 'c' will configure |
|---|
| 81 | Pressing 'g' will generate the make files and exit |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | If you'd like to be prompted with questions for each option, execute |
|---|
| 85 | the following from the build directory: |
|---|
| 86 | $ cmake -i ../ |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | From the command-line option, the cmake option -D allows setting Avida |
|---|
| 90 | configuration options with the following syntax: |
|---|
| 91 | -D<variable name>:<type>=<value> |
|---|
| 92 | |
|---|
| 93 | To completely specify each of the above Avida options, cd into your |
|---|
| 94 | build directory and type something like : |
|---|
| 95 | $ cmake -DAVD_CONSISTENCY_TEST_PRIMITIVE:BOOL=OFF \ |
|---|
| 96 | -DAVD_GUI_NCURSES:BOOL=ON \ |
|---|
| 97 | -DAVD_PRIMITIVE:BOOL=ON \ |
|---|
| 98 | -DAVD_UNIT_TESTS:BOOL=OFF \ |
|---|
| 99 | -DCMAKE_BUILD_TYPE:STRING=Release \ |
|---|
| 100 | path-to-source-directory |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | Revised 2005-16-10 DMB |
|---|