hg clone http://hg.mrzv.org/Dionysus/ cd Dionysus hg up tip
If you don’t have time or desire to deal with Mercurial, you can download the tarball of the entire repository. The advantage of using Mercurial is that it makes it very easy to keep up with the updates that are periodically committed to the repository:
hg pull -u
Dionysus requires the following software:
To build the examples as well as the Python bindings, create a directory build. Inside that directory run cmake and make:
mkdir build cd build cmake .. make
To use GCC 4.2 on a Mac one can try CXX=g++-4.2 cmake .. instead of cmake ...
Instead of cmake, one can run ccmake for a curses interface. The following configuration options are available. One can set them either through the curses interface or by passing a flag of the form -Doptimize:bool=on to cmake.
debug: Turns on debugging compilation optimize: Turns on compiler optimizations (on by default) logging: Turns on logging facilities counters: Turns on various built-in counters
Depending on the combination of debugging and optimization, a particular CMAKE_CXX_FLAGS* is chosen.
The default settings work fine unless you want to dive into the library’s internals with logging or study the performance of various algorithms with counters.
Write sections on logging and counters.
Some parts of Dionysus understand the DEBUG_CONTAINERS definition which can be appended to CMAKE_CXX_FLAGS. If set, the library will use GCC STL’s debugging containers (from the std::__debug namespace defined in debug/* header files). These containers return safe iterators (the kind that check whether they are singular when compared, or additionally whether they are out of bounds when dereferenced).
At the moment there are no installation procedures. To run the Python code you need to have .../build/bindings/python somewhere in your PYTHONPATH. I.e. add:
to your ~/.bashrc (assuming you are using Bash). Alternatively, run the python examples from within .../build/bindings/python:
The C++ examples can be run from anywhere. The C++ library consists only of header files (no library actually needs to be built), so to compile against it, it suffices to add -I .../Dionysus/include to your g++ flags:
g++ your-code.cpp -o your-code -I .../Dionysus/include
Proper installation procedures (with make install) will be added in the future.