Unverified Commit 4824992a authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

update documentation for recent changes to CMake presets

parent 5a751254
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -108,7 +108,8 @@ command-line options. Several useful ones are:
-D CMAKE_BUILD_TYPE=type      # type = Release or Debug
-G output                     # style of output CMake generates
-DVARIABLE=value              # setting for a LAMMPS feature to enable
-D VARIABLE=value             # ditto, but cannot come after CMakeLists.txt dir :pre
-D VARIABLE=value             # ditto, but cannot come after CMakeLists.txt dir
-C path/to/preset/file        # load some CMake settings before configuring :pre

All the LAMMPS-specific -D variables that a LAMMPS build supports are
described on the pages linked to from the "Build"_Build.html doc page.
+17 −11
Original line number Diff line number Diff line
@@ -151,24 +151,30 @@ one of them as a starting point and customize it to your needs.

cmake -C ../cmake/presets/all_on.cmake \[OPTIONS\] ../cmake  | enable all packages
cmake -C ../cmake/presets/all_off.cmake \[OPTIONS\] ../cmake | disable all packages
cmake -C ../cmake/presets/std.cmake \[OPTIONS\] ../cmake | enable standard packages
cmake -C ../cmake/presets/user.cmake \[OPTIONS\] ../cmake | enable user packages
cmake -C ../cmake/presets/std_nolib.cmake \[OPTIONS\] ../cmake | enable standard packages that do not require extra libraries
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake | disable all packages that do not require extra libraries
cmake -C ../cmake/presets/manual_selection.cmake \[OPTIONS\] ../cmake | example of how to create a manual selection of packages :tb(s=|,a=l)
cmake -C ../cmake/presets/minimal.cmake \[OPTIONS\] ../cmake | enable just a few core packages
cmake -C ../cmake/presets/most.cmake \[OPTIONS\] ../cmake | enable most common packages
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake | disable packages that do require extra libraries or tools
cmake -C ../cmake/presets/mingw.cmake \[OPTIONS\] ../cmake | enable all packages compatible with MinGW (cross-)compilation on Windows :tb(s=|,a=l)s

NOTE: Running cmake this way manipulates the variable cache in your
current build directory. You can combine presets and options with
multiple cmake runs.
current build directory. You can combine multiple presets and options
with multiple cmake runs.

[Example:]

# build LAMMPS with all "standard" packages which don't
# use libraries and enable GPU package
# build LAMMPS with most commonly used packages, but then remove
# those requiring additional library or tools, but still enable
# GPU package and configure it for using CUDA. You can run.
mkdir build
cd build
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake :pre
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake :pre

# to add another package, say BODY to the previous configuration you can run:
cmake -D PKG_BODY=on . :pre

# to reset the package selection from above to the default of no packages
# but leaving all other settings untouched. You can run:
cmake -C ../cmake/presets/no_all.cmake . :pre
:line

[Make shortcuts for installing many packages]: