set host specific optimizations in CMAKE_TUNE_FLAGS, so they can be conveniently overridden

This commit is contained in:
Axel Kohlmeyer
2020-03-17 14:48:20 -04:00
parent 5779731da3
commit f893f4f8c7
3 changed files with 21 additions and 23 deletions

View File

@ -213,6 +213,13 @@ A few example command lines are:
For compiling with the Clang/LLVM compilers a special CMake preset is
included that can be loaded with `-C ../cmake/presets/clang.cmake`.
In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add compiler
flags to tune for optimal performance on given hosts. By default these are
initialized to some compiler specific flags, where known, to optimize the
LAMMPS executable with optimizations and instructions available on the host
where LAMMPS is compiled. For example, for Intel compilers this would be
``-xHost`` and for GNU compilers this would be ``-march=native``.
.. note::
When the cmake command completes, it prints a summary to the screen