diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index 2a64bc3240..9bee18146c 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -150,6 +150,42 @@ for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the *-G* command line flag. A list of available generator settings for your specific CMake version is given when running ``cmake --help``. +.. _cmake_multiconfig: + +Multi-configuration build systems +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Throughout this manual it is mostly assumed that LAMMPS is being built +on a Unix-like operating system with "make" as the underlying "builder", +since this is the most common case. In this case the build "configuration" +is chose using ``-D CMAKE_BUILD_TYPE=`` with ```` +being one of "Release", "Debug", "RelWithDebInfo", or "MinSizeRel". +Some build tools, however, can also use or even require to have a so-called +multi-configuration build system setup. For those the built type (or +configuration) is chosen at compile time using the same build files. E.g. +with: + +.. code-block:: bash + + cmake --build build-multi --config Release + +In that case the resulting binaries are not in the build folder directly +but in sub-directories corresponding to the build type (i.e. Release in +the example from above). Similarly, for running unit tests the +configuration is selected with the *-C* flag: + +.. code-block:: bash + + ctest -C Debug + +The CMake scripts in LAMMPS have basic support for being compiled using a +multi-config build system, but not all of it has been ported. This is in +particular applicable to compiling packages that require additional libraries +that would be downloaded and compiled by CMake. The "windows" preset file +tries to keep track of which packages can be compiled natively with the +MSVC compilers out-of-the box. Not all of those external libraries are +portable to Windows either. + Installing CMake ^^^^^^^^^^^^^^^^ diff --git a/doc/src/Build_windows.rst b/doc/src/Build_windows.rst index fa2296d302..4bb5cfec27 100644 --- a/doc/src/Build_windows.rst +++ b/doc/src/Build_windows.rst @@ -89,6 +89,11 @@ miss the correct master ``CMakeLists.txt``. Try to open the starting point. It is also possible to configure and compile LAMMPS from the command line with a CMake binary from `cmake.org `_. +Please note, that for either approach CMake will create a so-called +:ref:`"multi-configuration" build environment `, and +the command lines for building and testing LAMMPS must be adjusted +accordingly. + To support running in parallel you can compile with OpenMP enabled using the OPENMP package or install Microsoft MPI (including the SDK) and compile LAMMPS with MPI enabled. diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index d295767519..77e9df5a82 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1995,6 +1995,7 @@ minimizer minimizers minneigh minorder +MinSizeRel minSteps mintcream Mintmire @@ -2784,6 +2785,7 @@ relink relres relTol relu +RelWithDebInfo remappings remd Ren