Skip to content

Commit 21a0720

Browse files
authored
Merge pull request #3 from lammps/support-msmpi
Add support for compilation with MS-MPI SDK when cross-compiling
2 parents cbbecdb + 1d4b3c9 commit 21a0720

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

USER-AEAM/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,17 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
4848
set(mytarget package)
4949
endif()
5050
if(BUILD_MPI)
51-
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI aeamplugin.nsis
52-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
53-
DEPENDS aeamplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis
54-
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}-MPI.exe)
51+
if(USE_MSMPI AND CMAKE_CROSSCOMPILING)
52+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI aeamplugin.nsis
53+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
54+
DEPENDS aeamplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis
55+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}-MSMPI.exe)
56+
else()
57+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI aeamplugin.nsis
58+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
59+
DEPENDS aeamplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis
60+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-AEAM-plugin-${LAMMPS_VERSION}-MPI.exe)
61+
endif()
5562
else()
5663
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} aeamplugin.nsis
5764
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

USER-REBOMOS/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,17 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
4848
set(mytarget package)
4949
endif()
5050
if(BUILD_MPI)
51-
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI rebomosplugin.nsis
52-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
53-
DEPENDS rebomosplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis
54-
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}-MPI.exe)
51+
if(USE_MSMPI AND CMAKE_CROSSCOMPILING)
52+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI rebomosplugin.nsis
53+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
54+
DEPENDS rebomosplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/rebomosplugin.nsis
55+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}-MSMPI.exe)
56+
else()
57+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI rebomosplugin.nsis
58+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
59+
DEPENDS rebomosplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/rebomosplugin.nsis
60+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-REBOMOS-plugin-${LAMMPS_VERSION}-MPI.exe)
61+
endif()
5562
else()
5663
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} rebomosplugin.nsis
5764
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

USER-VCSGC/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,17 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
5050
set(mytarget package)
5151
endif()
5252
if(BUILD_MPI)
53-
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI vcsgcplugin.nsis
54-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
55-
DEPENDS vcsgcplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/aeamplugin.nsis
56-
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}-MPI.exe)
53+
if(USE_MSMPI AND CMAKE_CROSSCOMPILING)
54+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI vcsgcplugin.nsis
55+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
56+
DEPENDS vcsgcplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/vcsgcplugin.nsis
57+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}-MSMPI.exe)
58+
else()
59+
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI vcsgcplugin.nsis
60+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
61+
DEPENDS vcsgcplugin ${CMAKE_BINARY_DIR}/lammps.ico ${CMAKE_BINARY_DIR}/lammps-text-logo-wide.bmp ${CMAKE_BINARY_DIR}/vcsgcplugin.nsis
62+
BYPRODUCTS ${CMAKE_BINARY_DIR}/LAMMPS-USER-VCSGC-plugin-${LAMMPS_VERSION}-MPI.exe)
63+
endif()
5764
else()
5865
add_custom_target(${mytarget} ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} vcsgcplugin.nsis
5966
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

0 commit comments

Comments
 (0)