carlobertolli/OP2-Common — pull request #11 by kynan (2012-01-21 18:21:58+00:00)
Title: Add CMake build support

The recommended way of building the library is using CMake (http://cmake.org).

For a standard developer build with debugging symbols and all features enabled
run (the installation prefix is the current directory):

./cmake.local

CMake will automatically detect which dependencies are installed and build the
libraries for which dependencies are satisfied, automatically skipping others.

The build is highly customisable:
* Select which libraries variants to build (sequential, cuda, hdf5, mpi, openmp)
* Choose the installation prefix
* Change compiler flags
* Set paths to non-standard installations of dependencies
* etc.

Since CMake builds are out-of-source, you can have as many builds as you want
wherever you want from the same source with different options.

For custom builds, there are several options:

1. Write your own build script based on cmake.local and customise it to your
needs.

2. Use a cmake GUI (ccmake or cmake-gui) to set custom build options:

mkdir build && cd build && ccmake ..

will generate Makefiles in the subdirectory 'build'.

3. Edit the cache file build/CMakeCache.txt with a text editor and re-run
cmake.