| 83 | }}} |
| 84 | |
| 85 | == Advanced building options == |
| 86 | |
| 87 | Although the {{{build.sh}}} script should be sufficient in more cases, sometimes it can not |
| 88 | detect where certain libraries are located. This is often true for the MPI example and for |
| 89 | compiling the MTO with Boost. |
| 90 | The build settings can be modified by setting the following environment variables: |
| 91 | |
| 92 | ||= Variable ||= Setting ||= Example || |
| 93 | || BOOST_INCLUDEDIR || Location of Boost headers || {{{/opt/boost/include}}} || |
| 94 | || BOOST_LIBRARYDIR || Location of Boost libraries || {{{/opt/boost/lib}}} |||| MPI_C_COMPILER || Compiler used for the C MPI example || {{{/usr/bin/mpicc}}} || |
| 95 | || MPI_C_FLAGS || Flags to give the C MPI compiler || {{{-O3 -Wall}}} || |
| 96 | || MPI_C_INCLUDE_PATH || Location of include files for C MPI || {{{/usr/include}}} || |
| 97 | || MPI_C_LIBRARIES || All libraries needed to link with for C MPI (semicolon separated) || {{{/usr/lib/libmpi.so;/usr/lib/libm.so}}} || |
| 98 | |
| 99 | Possible build options can be evaluated by going to the build directory and running |
| 100 | {{{ |
| 101 | cmake -L .. |
| 102 | }}} |
| 103 | |
| 104 | Even more detailed build options are found with |
| 105 | {{{ |
| 106 | cmake -LA .. |
| 107 | }}} |
| 108 | |
| 109 | These options can be passed to cmake by setting the environment variable |
| 110 | {{{ |
| 111 | export MUSCLE_CMAKE_OPTIONS="-DOPTION=VALUE -DOPTION2=VALUE2" |
| 112 | }}} |
| 113 | For example, to build the python extension: |
| 114 | {{{ |
| 115 | export MUSCLE_CMAKE_OPTIONS="-DBUILD_PYTHON=ON" |
| 116 | sudo ./build.sh |
| 117 | }}} |
| 118 | And if the libraries can not be found |
| 119 | {{{ |
| 120 | export MUSCLE_CMAKE_OPTIONS="-DBUILD_PYTHON=ON -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so" |
| 121 | sudo ./build.sh |