Merge "Merge branch origin/release-5-0"
[alexxy/gromacs.git] / docs / install-guide / index.rst
index ab66e6170757706cac02f50573f74d08174cf7d0..3eb21f5afa0dc39d27b79eb4f86515964836db25 100644 (file)
@@ -587,6 +587,13 @@ simulation using MPI libraries (e.g. BlueGene, Cray).
   where that is the default. To use static system libraries,
   additional compiler/linker flags are necessary, e.g. ``-static-libgcc
   -static-libstdc++``.
+* To attempt to link a fully static binary set
+  ``-DGMX_BUILD_SHARED_EXE=OFF``. This will prevent CMake from explicitly
+  setting any dynamic linking flags. This option also sets
+  ``-DBUILD_SHARED_LIBS=OFF`` and ``-DGMX_PREFER_STATIC_LIBS=ON`` by
+  default, but the above caveats apply. For compilers which don't
+  default to static linking, the required flags have to be specified. On
+  Linux, this is usually ``CFLAGS=-static CXXFLAGS=-static``.
 
 Portability aspects
 ^^^^^^^^^^^^^^^^^^^
@@ -949,13 +956,10 @@ Building on Cray
 ----------------
 |Gromacs| builds mostly out of the box on modern Cray machines, but
 
-* you may need to specify the use of static or dynamic libraries
-  (depending on the machine) with ``-DBUILD_SHARED_LIBS=off``,
+* you may need to specify the use of static binaries
+  with ``-DGMX_BUILD_SHARED_EXE=off``,
 * you may need to set the F77 environmental variable to ``ftn`` when
   compiling FFTW,
-* you may need to use ``-DCMAKE_SKIP_RPATH=YES``, and
-* you may need to modify the CMakeLists.txt files to specify the
-  ``BUILD_SEARCH_END_STATIC`` target property.
 
 Building on BlueGene
 --------------------