Added support for CMAKE builds by executing commands with shell=True

This commit is contained in:
Patrick Lipka 2022-09-28 11:36:36 +02:00
parent 970537e571
commit 86f1632a8d
1 changed files with 9 additions and 6 deletions

View File

@ -32,8 +32,8 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
if not os.path.exists(lib['name']+"-"+lib['version']):
print("Downloading Source Code")
load_command = lib['download'].replace("$VERSION_UNDERSCORE", lib_version.replace(".", "_")).replace("$VERSION", lib_version).split()
err = subprocess.call(load_command, stdout=logfile, stderr=logfile)
load_command = lib['download'].replace("$VERSION_UNDERSCORE", lib_version.replace(".", "_")).replace("$VERSION", lib_version)
err = subprocess.call(load_command, stdout=logfile, stderr=logfile, shell=True)
if err != 0:
print("Error: Download of "+lib_name+" v."+lib_version+" failed!")
print("See "+logfile_path+" for details")
@ -103,6 +103,9 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
print("See "+logfile_path+" for details")
sys.exit(1)
print("Library "+lib_name+" has been installed successfully!\n")
# copy logfile to install location
if not verbose:
build_output_path = inst_dir+"/"+"build_info"
if not os.path.exists(build_output_path):
os.makedirs(build_output_path)