manual:compileauryn
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:compileauryn [2016/06/01 16:52] – zenke | manual:compileauryn [2022/08/19 09:24] (current) – [Building Auryn from source] Remove forum link zenke | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{ : | + | {{ : |
| In most cases, compiling Auryn is hardly going to be that difficult, but there are a few things to keep in mind. | In most cases, compiling Auryn is hardly going to be that difficult, but there are a few things to keep in mind. | ||
| Line 9: | Line 9: | ||
| - | ===== Meeting the preliminaries | + | ===== Requirements |
| - | Apart from a standard C++ build environment you will need to meet certain requirements. Auryn currently depends on the [[http:// | + | Apart from a standard C++ build environment you will need the [[http:// |
| + | With these preliminaries met, you can proceed as follows. | ||
| + | ==== Getting the source with git ==== | ||
| + | First clone Auryn' | ||
| + | < | ||
| + | git clone https:// | ||
| + | </ | ||
| + | This will create a new directory '' | ||
| - | ===== Getting the source ===== | ||
| - | Download | + | ==== Getting |
| + | Alternatively, | ||
| To unpack a tgz compressed | To unpack a tgz compressed | ||
| Line 25: | Line 32: | ||
| - | ==== Getting the master branch with git ==== | + | ===== Building Auryn from source ===== |
| - | You can either download a zipped file with the development branch from [[https://github.com/ | + | Once you have downloaded |
| + | To build Auryn using cmake simply | ||
| < | < | ||
| - | git clone https://github.com/fzenke/ | + | cd auryn/build/release |
| + | ./bootstrap.sh && make | ||
| </ | </ | ||
| - | This will create a new directory '' | ||
| - | |||
| - | |||
| - | ===== Building Auryn from source ===== | ||
| - | To facilitate compiling Auryn on other systems, Auryn uses the cmake build system. For this to work you have to install '' | + | Instead of the bootstrap script |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | ==== Compiling examples and simulator using cmake ==== | + | |
| - | + | ||
| - | To compile the Auryn library and examples create a directory '' | + | |
| < | < | ||
| cmake ../../ -DCMAKE_BUILD_TYPE=Release && make | cmake ../../ -DCMAKE_BUILD_TYPE=Release && make | ||
| </ | </ | ||
| - | you find the library '' | ||
| - | **Frustrated?? | + | If you want to specify an install prefix add the option '' |
| - | ==== Building | + | Either way you will find the compiled library '' |
| - | To create a debug run instead use: | ||
| - | < | ||
| - | cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make | ||
| - | </ | ||
| - | This will turn off all optimizations and compile all binaries with the " | ||
| - | People hacking the simulator code will probably want to enable the -Wall option. To do so modify the file '' | + | ===== Running a test ===== |
| - | < | + | |
| - | cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make VERBOSE=1 | + | |
| - | </ | + | |
| - | to show compiler warnings. | + | |
| - | + | ||
| - | ===== Different ways of building Auryn ===== | + | |
| - | + | ||
| - | ==== Autotools version of Auryn (configure && make) ==== | + | |
| - | + | ||
| - | The github user sanjayankur31 maintains an autotool version of Auryn with the standard gnu build toolchain (i.e. configure and make) which can be found here | + | |
| - | [[https:// | + | |
| - | + | ||
| - | ==== Building older versions of Auryn (< | + | |
| - | See instructions [[BuildWithMakefile|here]]. | + | |
| - | + | ||
| - | + | ||
| - | ===== After compilation | + | |
| If you compiled Auryn using the existing Makefile (the old way) you can test the setup by issuing from within the '' | If you compiled Auryn using the existing Makefile (the old way) you can test the setup by issuing from within the '' | ||
| < | < | ||
| Line 104: | Line 79: | ||
| - | ===== Building your own simulations/ | + | ==== Building your own simulations/ |
| See the [[CompileAndRunAurynSimulations]] guide to see how you can conveniently link your own simulations against the Auryn library. | See the [[CompileAndRunAurynSimulations]] guide to see how you can conveniently link your own simulations against the Auryn library. | ||
| + | |||
| + | |||
| + | |||
| + | ====== Building other versions ====== | ||
| + | |||
| + | ===== Auryn development version ===== | ||
| + | |||
| + | Some of the newest features might only be available in the development version. If you want to compile the development version, simply clone and compile Auryn as follows: | ||
| + | < | ||
| + | git clone -b develop https:// | ||
| + | cd auryn/ | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Building Auryn without MPI ===== | ||
| + | |||
| + | Starting from v0.8 you can build Auryn without MPI if need be. To do so, open the file '' | ||
| + | <code c++> | ||
| + | #define AURYN_CODE_USE_MPI | ||
| + | </ | ||
| + | |||
| + | This will disable any dependence on MPI in the source code. Then in the '' | ||
| + | < | ||
| + | FIND_PACKAGE(MPI REQUIRED) | ||
| + | </ | ||
| + | and comment it out or remove the '' | ||
| + | |||
| + | ===== Building Auryn with debug symbols (reduces performance) ===== | ||
| + | |||
| + | To create a debug run instead use: | ||
| + | < | ||
| + | cd build/debug | ||
| + | cmake ../../ -DCMAKE_BUILD_TYPE=Debug | ||
| + | make | ||
| + | </ | ||
| + | or alternatively | ||
| + | < | ||
| + | cd build/debug | ||
| + | ./bootstrap && make | ||
| + | </ | ||
| + | |||
| + | This will turn off all optimizations and compile all binaries with the " | ||
| + | |||
| + | People hacking the simulator code will probably want to enable the -Wall option. To do so modify the file '' | ||
| + | < | ||
| + | cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make VERBOSE=1 | ||
| + | </ | ||
| + | to show compiler warnings. | ||
| + | |||
| + | |||
| + | |||
| + | ===== Building older versions of Auryn (< | ||
| + | See instructions [[BuildWithMakefile|here]]. | ||
| + | |||
| + | |||
manual/compileauryn.1464799964.txt.gz · Last modified: 2016/06/01 16:52 by zenke
