Commit 1af833c9 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Add %mpi_repository macro to prjconf

parent ecdf5350
......@@ -236,8 +236,6 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
have_mpi = is_mpi or is_cuda_mpi
have_cuda = is_cuda or is_cuda_mpi
if kwargs:
raise Exception("Invalid argument")
r = ElementTree.SubElement(root, "repository")
r.set("name", name)
r.text = "\n "
......@@ -272,6 +270,9 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
prjconf.append("%have_mpcdf_mpi {0}".format(1 if have_mpi else 0))
prjconf.append("%have_mpcdf_cuda {0}".format(1 if have_cuda else 0))
for macro, value in kwargs.items():
prjconf.append("%{0} {1}".format(macro, value))
prjconf.append(":Macros")
prjconf.append("%endif")
prjconf.append("")
......@@ -285,7 +286,7 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
repo(compiler, (project, "System"), compiler=True)
for mpi in filter(partial(valid_mpi, compiler), mpis):
repo(mpi + "_" + compiler, (project, compiler), mpi=True)
repo(mpi + "_" + compiler, (project, compiler), mpi=True, mpi_repository=mpi)
for cuda in cudas:
for compiler in filter(partial(valid_cuda, cuda), compilers):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment