Skip to content

Commit

Permalink
updates for compiling LAMMPS with PLUMED plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Aug 28, 2024
1 parent 4df95fd commit 1a91f50
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions mingw-cross/cmake-win-on-linux.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

# Script to build windows installer packages for LAMMPS
# (c) 2017,2018,2019,2020,2021,2022 Axel Kohlmeyer <[email protected]>
# (c) 2017,2018,2019,2020,2021,2022,2023,2024 Axel Kohlmeyer <[email protected]>

from __future__ import print_function
import sys,os,shutil,glob,re,subprocess,tarfile,gzip,time,inspect
Expand Down Expand Up @@ -299,7 +299,7 @@ def is_exe(fpath):
qtconf.close()

print("Compiling")
system("cmake --build . --parallel 8")
system("cmake --build . --parallel %d" % numcpus)
print("Done")

print("Configuring demo plugin build with CMake")
Expand Down Expand Up @@ -332,7 +332,7 @@ def is_exe(fpath):
print("Done")

print("Compiling and building installer")
txt = system("cmake --build paceplugin --target package")
txt = system("cmake --build paceplugin --target package --parallel %d" % numcpus)
if verbose: print(txt)
for exe in glob.glob('paceplugin/LAMMPS*plugin*.exe'):
shutil.move(exe,os.path.join('..',os.path.basename(exe)))
Expand All @@ -351,14 +351,17 @@ def is_exe(fpath):
print("Done")

print("Compiling and building installer")
txt = system("cmake --build plumedplugin --target package")
txt = system("cmake --build plumedplugin --target package --parallel %d" % numcpus)
if verbose: print(txt)
for exe in glob.glob('plumedplugin/LAMMPS*plugin*.exe'):
shutil.move(exe,os.path.join('..',os.path.basename(exe)))
print("Done")

print("Cloning lammps-plugin package")
txt = system("git clone -b %s --depth 1 [email protected]:lammps/lammps-plugins.git" % revflag)
if revflag == 'stable' or revflag == 'release' or rev2.match(revflag):
txt = system("git clone -b %s --depth 1 [email protected]:lammps/lammps-plugins.git" % revflag)
else:
txt = system("git clone -b develop --depth 1 [email protected]:lammps/lammps-plugins.git")
if verbose: print(txt)
print("Configuring LAMMPS plugin collection build with CMake")
cmd = "mingw%s-cmake -D CMAKE_BUILD_TYPE=Release" % bitflag
Expand Down

0 comments on commit 1a91f50

Please sign in to comment.