Installing mathemagix with cmake


Here is the list of packages to be installed before using the default configuration of mmx:

src rpm deb port (Mac)
libtool-2.2.4 libtool-(ltdl-)devel libtool-dev libtool
readline-6.0 readline-devel libreadline-dev readline
ncurses-5.7 ncurses-devel libncurses-dev ncurses

If you want to compile the package numerix, you also need to install:

src rpm deb port (Mac)
gmp-4.3.1 gmp-devel libgmp-dev gmp
mpfr-2.4.2 mpfr-devel libmpfr-dev mpfr

If you want to compile the package linalg, you also need to install:

src rpm deb port (Mac)
blas blas-devel atlas(-sse2)(-dev) blas
lapack-3.2.1 lapack-devel lapack lapack

If you want to configure additional subpackages of mmx, some other external packages may be required. In this case, please consult the installation instructions available for each mmx package.

2.Download the source

You can either


To run the configuration, cmake version at least should be available on your platform.

Local installation. The package can be configured out-of-source (eg. in a folder ../build) as follows:

mkdir build; cd build;
cmake ../<path_to_mmx>

The folder where the construction will be run is in this case ../build.

Global installation. If you want to install it globally in your environment after it is compiled, you can run the following instructions (possibly with the superuser rights):

cmake ../<path_to_mmx> -DCMAKE_INSTALL_PREFIX=<install_dir>
make install

where <install_dir> is the folder where to install the package so that the libraries go in <install_dir>/lib; and the headers in <install_dir>/include. If not specified, the package is installed by default in /usr/local.

More information on the configuration with cmake are available here.

To see the operations performed during the make command, you can use:

make VERBOSE=1

4.How to set locally your environment variables

In case you have not run make install, you can set up your environment locally in the folder build with:

source <path_to_build>/local_env

5.Using mmx in a cmake project

To use the package mmx in a cmake project, you can simply add the following lines in your file CMakeLists.txt:

include_directories (${MMX_INCLUDE_DIR})
link_directories (${MMX_LIBRARY_DIR})
link_libraries (${MMM_LIBRARIES})

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.