Update CMake building guide
Following a question from J. Tamir, added more precisions on how to
compile with CMake when using libraries in non-standard locations.
@@ -9,7 +9,7 @@ _________________
1 Overview
2 Building BART
-.. 2.1 Quick build guide
+.. 2.1 Quick building guide
..... 2.1.1 Download and install LAPACKE locally
..... 2.1.2 Building of BART
.. 2.2 Main Build Targets
@@ -18,6 +18,7 @@ _________________
..... 2.2.3 Install
..... 2.2.4 Packaging
..... 2.2.5 Cleaning up
+.. 2.3 Non-standard locations (libraries, Python, etc.)
3 Build options
.. 3.1 Adding new BART commands
.. 3.2 Compiler
@@ -78,8 +79,8 @@ _________________
the above mentioned names (e.g. `cmake -DLINALG_VENDOR="ATLAS" ..').
-2.1 Quick build guide
-~~~~~~~~~~~~~~~~~~~~~
+2.1 Quick building guide
+~~~~~~~~~~~~~~~~~~~~~~~~
BART depends upon the new lapacke.h and cblas.h interfaces for blas
and lapack. These new 'C' interfaces are often not packaged robustly
@@ -202,6 +203,66 @@ _________________
(e.g. issuing `make clean' on UNIX)
+2.3 Non-standard locations (libraries, Python, etc.)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ If you have some of your libraries installed in some non-standard
+ locations (e.g. on UNIX outside of `/usr' or `/usr/local'), you can
+ ask CMake to look for the requested libraries in other locations by
+ defining either some environment variables or some CMake variables.
+
+ Here is an exhaustive list of variables that may influence the
+ building of BART:
+
+ Variable name Type Description
+ --------------------------------------------------------------------
+ CMAKE_PREFIX_PATH env./CMake Define good defaults for
+ searching for packages
+
+ ATLAS_ROOT env./CMake Preferred installation prefix
+ ATLAS_DIR for the ATLAS libraries
+
+ CUDA_ROOT env./CMake Preferred installation prefix
+ CUDA_TOOLKIT_ROOT_DIR for the CUDA toolkit and
+ libraries
+
+ FFTW_ROOT env./CMake Preferred installation prefix
+ FFTW_DIR for the FFTW libraries
+
+ LAPACKE_ROOT env./CMake Preferred installation prefix
+ LAPACKE_DIR for the LAPACKE libraries
+
+ libFlame_ROOT env./CMake Preferred installation prefix
+ libFlame_DIR for the AMD libFlame libraries
+
+ OpenBLAS_ROOT env./CMake Preferred installation prefix
+ OpenBLAS_DIR for the OpenBLAS libraries
+
+ Python_ROOT_DIR env./CMake Define the root directory of a
+ Python installation.
+
+ Python_USE_STATIC_LIBS CMake only If not defined, search for
+ shared libraries and static
+ libraries in that order.
+ If set to TRUE, search *only*
+ for static libraries.
+ If set to FALSE, search *only*
+ for shared libraries.
+
+ PYBART_NUMPY_ROOT env./CMake Define directory containing
+ PYBART_NUMPY_DIR NumPy's arrayobject.h
+
+ These variables would typicaly be used either as environment
+ variables:
+ ,----
+ | OpenBLAS_ROOT=/home/user/my_openblas Python_ROOT_DIR=/opt/anaconda/ cmake ..
+ `----
+ or directly as CMake variables:
+ ,----
+ | cmake .. -DOpenBLAS_ROOT=/home/user/my_openblas -DPython_ROOT_DIR=/opt/anaconda/
+ `----
+
+
3 Build options
===============
