Skip to content
Snippets Groups Projects
Commit 7ab11488 authored by Richard Berger's avatar Richard Berger
Browse files

Added brief discussion on how to use presets files with CMake

parent 3384c683
No related branches found
No related tags found
No related merge requests found
...@@ -130,9 +130,35 @@ the Git or SVN repositories, no packages are pre-installed. ...@@ -130,9 +130,35 @@ the Git or SVN repositories, no packages are pre-installed.
[CMake shortcuts for installing many packages]: [CMake shortcuts for installing many packages]:
TODO: brief discussion of the cmake command line options with presets Instead of specifying all the CMake options via the command-line, CMake allows
that Axel or Richard enabled to install sets of packages at once? initializing the variable cache using script files. These are regular CMake
Are these just for cmake, or also ccmake and cmake-gui? files which can manipulate and set variables, and can also contain control flow
constructs.
LAMMPS includes several of these files to define configuration "presets",
similar to the options that exist for the Make based system. Using these files
you can enable/disable portions of the available packages in LAMMPS. If you need a
custom preset you can take 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)
NOTE: Running cmake this way manipulates the variable cache in your current
build directory. You can combine presets and options with multiple cmake runs.
[Example:]
# build LAMMPS with all "standard" packages which don't
# use libraries and enable GPU package
mkdir build
cd build
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake :pre
:line :line
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment