From 1a91f50118d2a0a3ff11ecda60988a81dd966a14 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 28 Aug 2024 16:06:56 -0400 Subject: [PATCH] updates for compiling LAMMPS with PLUMED plugin --- mingw-cross/cmake-win-on-linux.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mingw-cross/cmake-win-on-linux.py b/mingw-cross/cmake-win-on-linux.py index 34a4052..5225f9f 100755 --- a/mingw-cross/cmake-win-on-linux.py +++ b/mingw-cross/cmake-win-on-linux.py @@ -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 +# (c) 2017,2018,2019,2020,2021,2022,2023,2024 Axel Kohlmeyer from __future__ import print_function import sys,os,shutil,glob,re,subprocess,tarfile,gzip,time,inspect @@ -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") @@ -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))) @@ -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 git@github.com:lammps/lammps-plugins.git" % revflag) + if revflag == 'stable' or revflag == 'release' or rev2.match(revflag): + txt = system("git clone -b %s --depth 1 git@github.com:lammps/lammps-plugins.git" % revflag) + else: + txt = system("git clone -b develop --depth 1 git@github.com: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