This commit is contained in:
Axel Kohlmeyer
2022-04-07 14:50:33 -04:00
parent 9b969648d5
commit e2f25a96e1

View File

@ -272,14 +272,14 @@ as the LAMMPS executable and library. Otherwise the plugin will likely
not load due to mismatches in the function signatures (LAMMPS is C++ so not load due to mismatches in the function signatures (LAMMPS is C++ so
scope, type, and number of arguments are encoded into the symbol names scope, type, and number of arguments are encoded into the symbol names
and thus differences in them will lead to failed plugin load commands. and thus differences in them will lead to failed plugin load commands.
Compilation of the plugin can be done managed via both, CMake or Compilation of the plugin can be managed via both, CMake or traditional
traditional GNU makefiles. Some examples that can be used as a template GNU makefiles. Some examples that can be used as a template are in the
are in the ``examples/plugins`` folder. The CMake script code has some ``examples/plugins`` folder. The CMake script code has some small
small adjustments to allow building he plugins for running unit tests adjustments to allow building the plugins for running unit tests with
with them. Another example that converts the KIM package into a plugin them. Another example that converts the KIM package into a plugin can be
can be found in the ``examples/kim/plugin`` folder. No changes to the found in the ``examples/kim/plugin`` folder. No changes to the sources
sources of the KIM package themselves are needed; only the plugin of the KIM package themselves are needed; only the plugin interface and
interface and loader code needs to be added. This example only supports loader code needs to be added. This example only supports building with
building with CMake, but is probably a more typical example. To compile CMake, but is probably a more typical example. To compile you need to
you need to run CMake with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. run CMake with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other
Other configuration setting are identical to those for compiling LAMMPS. configuration setting are identical to those for compiling LAMMPS.