Commit cab260f3 authored by Christoph Junghans's avatar Christoph Junghans
Browse files

cmake: fix mpi default on Windows

parent b83c98db
Loading
Loading
Loading
Loading
+4 −0
Changes for cmake/CMakeLists.txt: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -176,11 +176,15 @@ if(PKG_USER-ADIOS)
  target_link_libraries(lammps PRIVATE adios2::adios2)
endif()

if (CMAKE_SYSTEM_NAME STREQUAL Windows)
  option(BUILD_MPI "Build MPI version" OFF)
else()
  # do MPI detection after language activation,
  # in case MPI for these languages is required
  set(MPI_CXX_SKIP_MPICXX TRUE)
  find_package(MPI QUIET)
  option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
endif()

if(BUILD_MPI)
  # We use a non-standard procedure to compile with MPI on windows