]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Improve documentation wrt manual overrides
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 24 Mar 2013 13:33:57 +0000 (13:33 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 24 Mar 2013 13:33:57 +0000 (13:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@29013 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/development/Config.sample
deal.II/doc/development/cmake.html

index e683bf23897ecabf6d54693baa55bbfd231a774d..dac9a7c2dc6e329f7ed74b46fbf48e362df6ca7a 100644 (file)
 
 
 #
-# Lapack:
+# BLAS and LAPACK:
 #
 # SET(DEAL_II_WITH_LAPACK ON CACHE BOOL
 #   "Build deal.II with support for lapack"
 #   )
 #
+#
 # Automatic detection:
 #
-# Specify a hint with CMAKE_PREFIX_PATH.
+# You can set the BLAS/LAPACK vendor that should be found with
+#
+# SET(BLA_VENDOR "Goto" CACHE STRING "")
+#   Valid vendors: Goto, ATLAS, PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH,
+#   IBMESSL, Intel10_32, Intel10_64lp, Intel10_64lp_seq, ACML, ACML_MP,
+#   ACML_GPU, Apple, NAS, Generic
+#
+# BLA_VENDOR will also be recognized by FindLAPACK.cmake.
+#
+# If your BLAS/LAPACK installation resides at a non system location, specify
+# a hint with CMAKE_PREFIX_PATH.
+#
 #
 # Manual setup:
 #
+# SET(BLAS_FOUND TRUE CACHE BOOL "")
+# SET(BLAS_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "")
+# SET(BLAS_LINKER_FLAGS "..." CACHE STRING "")
+#
 # SET(LAPACK_FOUND TRUE CACHE BOOL "")
 # SET(LAPACK_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "")
 # SET(LAPACK_LINKER_FLAGS "..." CACHE STRING "")
index 9f53eabdcfccfc095aa4fb186e31cc6c439df02d..f6bde3aaf1fba61ecfd968eb3bd371afcc142cda 100644 (file)
 
     <a name="configureoverride"></a>
     <h4> Manual override </h4>
-    <p><b>Warning:</b>Do not do this unless absolutely necessary!</p>
+    <p><b>Warning:</b> Do not do this unless absolutely necessary!</p>
     <p>
       It is possible to override the CMake find mechanism for external
       libraries manually. This is useful if a non standard library (e.g.
       BLAS or LAPACK) should be used but cannot be found by the
-      <code>FIND_PACKAGE(...)</code> mechanism of cmake in the default
-      directories.
+      <code>FIND_PACKAGE(...)</code> mechanism.
+
       In this case you can set by hand:
       <pre>
 
-    cmake -DLAPACK_FOUND=true \
-          -DLAPACK_LIBRARIES="library;and;complete;link;interface"
+    cmake -D&lt;lib&gt;_FOUND=true \
+          -D&lt;lib&gt;_LIBRARIES="library;and;complete;link;interface" \
+        ( -D&lt;lib&gt;_INCLUDE_DIRS="semicolon;separated;list;of;include;dirs" \
+          -D&lt;lib&gt;_LINK_FLAGS="..." \
+          -D&lt;lib&gt;_&lt;...depending on library...&gt; )
       </pre>
-      The first of the two defines ensures that <code>cmake</code> 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 (here, these libraries have been compiled with the
-      gfortran compiler and need its support library):
+
+      The first define ensures that <code>cmake</code> does not
+      call the corresponding <code>Find&lt;lib&gt;.cmake</code> module.
+      Therefore, all information that would be otherwise exported by the
+      module must be specified by hand. (See the
+      <a href="Config.sample" target="_top">Config.sample file</a> for a
+      detailed list of valid variables per feature.)
+    </p>
+    <p>
+      An example of use is to select BLAS and LAPACK manually as follows
+      (here, these libraries have been compiled with the gfortran compiler
+      and need its support library):
       <pre>
 
     cmake -DBLAS_FOUND=true \
-          -DBLAS_LIBRARIES="-L/apps/GotoBLAS/lib64 -lgoto -lgfortran" \
+          -DBLAS_LIBRARIES="/apps/GotoBLAS/lib64/libgoto.so" \
+          -DBLAS_LINKER_FLAGS="-lgfortran" \
           -DLAPACK_FOUND=true \
-          -DLAPACK_LIBRARIES="-L/apps/lapack-3.2.1/lib64 -llapack -L/apps/GotoBLAS/lib64 -lgoto -lgfortran"
+          -DLAPACK_LIBRARIES="/apps/lapack-3.2.1/liblapack.so;/apps/GotoBLAS/lib64/libgoto.so" \
+          -DLAPACK_LINKER_FLAGS="-lgfortran"
       </pre>
 
       You can set these values on the command line, with <code>ccmake</code>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.