Dependencies

NemoMath depends of the following tools and libraries, which are by default installed on all recent Ubuntu Linux configurations:

  • Build system: CMake (if you install NemoMath from source)
  • Libraries:
    1. Boost (header-only parts) (on ubuntu: libboost-dev, libboost-test-dev)
    2. Eigen 2 (on ubuntu: libeigen2-dev) or Eigen 3

Supported Platforms and Compilers

NemoMath is a cross-platform, cross-compiler library which is tested and maintained for the most frequently used system configurations:

Operating System Support

  • Supported:
    1. Linux, Ubuntu 10.04 and newer
    2. Mac OS 10.7 and newer
    3. Windows 7 and newer

Compiler Support

  • Supported:
    1. GCC from version 4.3, 32/64bit (tested on Ubuntu Linux)
    2. CLang3.0 (tested on MacOS)
    3. MSVC 2010 or newer (tested on Windows 7)
  • Not supported (and known not to work):
    1. GCC version 4.2, or older
    2. MSVC 2008 or older

Test configurations

These configurations are continuously tested and known to work:
  • Windows 7, Microsoft Visual Studio 2010, Boost 1.44.0, Eigen 2
  • Mac OS 10.7 "Lion" 64bit, Clang 2.1.0, Boost 1.47.0, Eigen 3.1.0
  • Ubuntu Linux 10.04 "Lucid Lynx" 32bit+64bit, GCC 4.4.3, Boost 1.40.0, Eigen 3.0.0
  • Ubuntu Linux 12.04 "Precise Pangolin" 32bit+64bit, GCC 4.6.3, Boost 1.46.1, Eigen 3.0.5
  • Ubuntu Linux 12.10 "Quantal Quetzal" 32bit+64bit, GCC 4.7.2, Boost 1.49.0, Eigen 3.0.93

Pre-Configured Installation

Debian packages

This is the recommended installation procedure for NemoMath on Ubuntu Systems.

Packages for Ubuntu Linux are constantly built on our continuous integration server for
  • Ubuntu Linux 10.04 "Lucid Lynx" 32bit + 64bit
  • Ubuntu Linux 12.04 "Precise Pangolin" 32bit + 64bit
  • Ubuntu Linux 12.10 "Quantal Quetzal" 32bit + 64bit

They can easily be downlaoded from out Package Server. Follow the link to get further instructions.

Gar System Installer

  1. Check out CITEC Gar System Installer from https://projects.cit-ec.uni-bielefeld.de/svn/gar-installer/trunk/ (you need an account)
  2. Go into sub-folder cor-lab/NemoMath
  3. On your console type
    • make install

Install from Source

Getting and installing the source

  • Get the source from https://code.cor-lab.org/svn/nemomath/, e.g.
    svn co https://code.cor-lab.org/svn/nemomath/trunk/nemomath
  • Build it under Linux or MacOS and install in into the directory $prefix:
    cd nemomath/build 
    cmake .. -DCMAKE_INSTALL_PREFIX=$prefix 
    make install
  • Build it under Windows/MSVC
    • Use your MSVC console and type nmake install, or
    • use the batch-file that comes with NemoMath to generate a zip-archive:
      cd nemomath
      call project\build_vs.bat

Install and Compile Options

The following options manipulate the way NemoMath works during compilation time:

  • CMake option: USE_CPP_0X (default: true)
    • Enables NemoMath to use C++ features from the latest standard. This option is mandatory except on GCC 4.3, where fallbacks for critical features (declared type of expressions) are available.
    • If enabled, NemoMath checks the particular features provided by the compiler and, for instance, enables to construct MathVector and Matrix instances from C++11 initialization lists.
    • The option can be steered on compiler level by defining the C++ macro NEMO_HAS_CPP0x, or not.
  • CMake option: ABORT_ON_ERROR (default: false)
    • By default, NemoMath throws C++ exceptions in case of runtime errors. This option allows to disable exceptions and call abort() in case of an error.
    • In particular on older compilers (e.g. GCC 4.4), this can have a tremendeously positive impact on performance (see Benchmarks in #821).
    • The option can be steered on compiler level by defining the C++ macro NEMO_ABORT_ON_ERROR, or not.

These options determine what CMake does when installing from source:

  • CMake option: BUILD_DOCS (default: false)
    • Build and install API-documentation (in HTML format), or not.
  • CMake option: BUILD_EXAMPLES (default: true)
    • Build example binaries, or not.
  • CMake option: BUILD_TESTS (default: true)
    • Build unit tests, or not.
    • If you build the tests, you can type make test in the build directory and see whether everything works properly.

Using NemoMath

NemoMath provides three essential ways of depending on it:
  • Build your own project with CMake und use NemoMath's NemoMathConfig.cmake script, which is installed to $prefix/share/NemoMath<version>/. Put this into your own project's CMakeLists.txt:
    find_package(NemoMath REQUIRED)
    message(STATUS "NemoMath version: ${NEMOMATH_VERSION}")
    add_definitions(${NEMOMATH_DEFINITIONS})
    include_directories(SYSTEM ${NEMOMATH_INCLUDE_DIRS})
  • Use the pkg-config tool to include the NemoMath<version>.pc configuration file, which is installed into $prefix/lib/pkgconfig. It contains the same information as the CMake script. How you use it depends on your build system, IDE, etc.. Many systems provide ways to include such package files.
  • If really necessary (seriously!), do it on your own. Since NemoMath is "header-only", and only has "header-only" dependencies, it's not overly complicated:
    1. Add the include dir of NemoMath ($prefix/include/NemoMath<version>), plus the include dirs of Boost and Eigen into the search path of your compiler.
    2. Add the necessary macro-definitions and compiler flags, e.g. on GCC would likely want to use "-std=c++0x -DNEMO_HAS_CPP0x".