From 1ebd60e35e5956c6d0691bbe4098da393e9f80f6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 25 Jul 2021 10:56:38 -0400 Subject: [PATCH] update and add explanation --- cmake/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 6c446bdb1b..7269fc5c9b 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -245,13 +245,14 @@ else() endif() if(BUILD_MPI) + # do not include the (obsolete) MPI C++ bindings which makes + # for leaner object files and avoids namespace conflicts + set(MPI_CXX_SKIP_MPICXX TRUE) # We use a non-standard procedure to cross-compile with MPI on Windows if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING) - set(MPI_CXX_SKIP_MPICXX TRUE) include(MPI4WIN) target_link_libraries(lammps PUBLIC MPI::MPI_CXX) else() - set(MPI_CXX_SKIP_MPICXX TRUE) find_package(MPI REQUIRED) target_link_libraries(lammps PUBLIC MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)