Logo MTL4
Testing with CMake

If you want to run the test programs, you will need the the cross-platform, open-source and build system CMake. This tool is easy to install, if you have Ubuntu, you can use the Synaptic Package Manager to install it, or well typing

sudo apt-get install cmake

on the terminal.

CMake can compile all examples of MTL4 just typing

make

in the directory with the examples, but if you want to doing that, you must generate the makefiles first.

Preparations:

  1. Cmake uses one environment variable and that is BOOST_ROOT to locate the Boost directory. In bash for example, you can set it with the comand "export", e.g.:

    export BOOST_ROOT=/usr/include/boost

    Note: you can write that line in your file ~/.bashrc, to have it all the time. With csh or tcsh you need accordingly:

    setenv BOOST_ROOT/usr/include/boost

    which can be put into ~/.cshrc as well.
  2. You need a C++ compiler, e.g. g++. On most Linux distributions, this is installed by default. If not you can install it easily with a package manager.

Running CMake

Now you must go to the directory of MTL4 and write on the terminal:

cmake .

to create all automatic files to compile the examples of MTL4.

Building tests and examples

After that, you can go to the directory "libs/numeric/mtl/examples", to write "make" and all examples will be compiled.


Testing with CMake -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Gen. with rev. 7542 on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.