allow to override the LAMMPS dll location on windows

this is to work around the situation that windows
has no equivalent to LD_LIBRARY_PATH (short of augmenting %PATH%,
which is tricky for CMake before 3.20)
This commit is contained in:
Axel Kohlmeyer
2022-01-30 05:13:17 -05:00
parent a8632d5cb6
commit 923b0cfc46

View File

@ -89,6 +89,9 @@ class lammps(object):
modpath = dirname(abspath(getsourcefile(lambda:0)))
# for windows installers the shared library is in a different folder
winpath = abspath(os.path.join(modpath,'..','..','bin'))
# allow override for running tests on Windows
if (os.environ.get("LAMMPSDLLPATH")):
winpath = os.environ.get("LAMMPSDLLPATH")
self.lib = None
self.lmp = None