dc25c57bfa4a3e06a5f6bb8aea734625a53fb58d
[alexxy/gromacs.git] / share / template / README
1 Once installed, this directory contains CMakelist.txt,
2 Makefile.pkg and a small program that you could use as
3 a template when writing your own analysis software.
4
5 The CMakelist.txt can be used together with cmake to
6 build the template program:
7 $ source /path/to/GMXRC
8 $ cmake /path/to/template
9 Alternatively, setting CMAKE_PREFIX_PATH will direct cmake
10 to find a particular GROMACS installation.
11
12 The Makefile.pkg can be used if cmake is unavailable. It
13 makes use of pkg-config only to build the template program:
14 $ source /path/to/GMXRC
15 $ make -f Makefile.pkg
16
17 You will need to make sure that you use a sufficiently similar C++
18 compiler and C++ Standard Library as the one that was used for
19 compiling GROMACS, preferably the same one. If you used any system
20 libraries (e.g. Boost, FFTW, BLAS, LAPACK) when installing GROMACS,
21 then you will need make them available to the template build system
22 also. The easiest way to do this is to have pkg-config installed on
23 your system, and to source GMXRC from the GROMACS installation before
24 you attempt to configure the template. A subset of Boost is supposed
25 to be installed with GROMACS, but currently the automatic machinery
26 does not detect that installation, so you may need to install Boost
27 (headers only) in order to use the GROMACS template program.
28
29 If the compiler used for GROMACS was capable of some C++11 features
30 then, by default, those will be required for compiling the
31 template. To make that work, you can either configure GROMACS with
32 $ cmake -DGMX_CXX11=off
33 or configure the template with the appropriate
34 $ cmake -DCMAKE_CXX_FLAGS="-flag-for-your-compiler"
35 You can find out the necessary flags from your compiler's documentation,
36 or by inspecting the src/buildinfo.h file in the GROMACS build tree.
37
38 ----------------------------------------------------------
39
40 If you are reading this in the distribution directory,
41 remember that CMakelist.txt.template will be renamed to
42 CMakelist.txt during the installation.