From: bangerth
It is possible to override the CMake find mechanism for external
libraries manually. This is useful if a non standard library (e.g.
- lapack/blas) should be used but cannot be found by the
- FIND_PACKAGE(...)
mechanism of cmake.
+ BLAS or LAPACK) should be used but cannot be found by the
+ FIND_PACKAGE(...)
mechanism of cmake in the default
+ directories.
In this case you can set by hand:
-
+
cmake -DLAPACK_FOUND=true \
- -DLAPACK_LIBRARIES="library;and;complete;link;interface" \
- -DLAPACK_LINKER_FLAGS="" <...>
+ -DLAPACK_LIBRARIES="library;and;complete;link;interface"
+
+ The first of the two defines ensures that cmake
doesn't
+ just take the second as hints but errors out if LAPACK can't
+ be used with the given library (if you are sure that the path works, you
+ can then omit the first command). An example of use is to select BLAS
+ and LAPACK as follows:
+
+
+ cmake -DBLAS_FOUND=true \
+ -DBLAS_LIBRARIES=/apps/GotoBLAS/lib64/libgoto.so \
+ -DLAPACK_FOUND=true \
+ -DLAPACK_LIBRARIES=/apps/lapack-3.2.1/lib64/liblapack.so
- You can set these values on the command line, with ccmake or by
- providing an initial cache file, see
+
+ You can set these values on the command line, with ccmake
+ or by providing an initial cache file, see
advanced setup section.
Possible manual overrides are explained in detail in the
in the Config.sample file.
+