mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Defensive check for existing LD_LIBRARY_PATH
This commit is contained in:
parent
2bfc036add
commit
789d66a0b1
1 changed files with 8 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ def build_dagmc():
|
|||
|
||||
os.chdir(home_dir)
|
||||
mkcd('MOAB')
|
||||
|
||||
|
||||
clone_cmd = ['git', 'clone', '-b', 'Version'+MOAB_VERSION, 'https://bitbucket.org/fathomteam/moab']
|
||||
subprocess.check_call(clone_cmd)
|
||||
|
||||
|
|
@ -87,8 +87,14 @@ def build_dagmc():
|
|||
|
||||
subprocess.check_call(['make','install'])
|
||||
|
||||
# check for existing LD_LIBRARY_PATH
|
||||
try:
|
||||
ld_lib_path = os.environ['LD_LIBRARY_PATH']
|
||||
except:
|
||||
ld_lib_path = ''
|
||||
|
||||
# update LB_LIBRARY_PATH (so DAGMC can find MOAB)
|
||||
os.environ['LD_LIBRARY_PATH'] = moab_install_dir + ":" + os.environ['LD_LIBRARY_PATH']
|
||||
os.environ['LD_LIBRARY_PATH'] = moab_install_dir+"/lib" + ":" + ld_lib_path
|
||||
|
||||
# build dagmc
|
||||
os.chdir(home_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue