Commit f3bf3a59 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Add a prjconf-level macro with the cuda repo

parent 0d17256f
Pipeline #67047 failed with stage
in 10 seconds
......@@ -300,6 +300,8 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
is_cuda = kwargs.pop("cuda", False)
is_cuda_mpi = kwargs.pop("cuda_mpi", False)
cuda_repo = kwargs.pop("cuda_repo", "")
have_compiler = is_compiler or is_mpi or is_cuda or is_cuda_mpi
have_mpi = is_mpi or is_cuda_mpi
have_cuda = is_cuda or is_cuda_mpi
......@@ -338,6 +340,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))
if is_cuda:
prjconf.append("%cuda_repository {0}".format(cuda_repo))
for macro, value in kwargs.items():
prjconf.append("%{0} {1}".format(macro, value))
......@@ -358,7 +363,7 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
for cuda in cudas:
for compiler in filter(partial(valid_cuda, cuda), compilers):
repo(cuda + "_" + compiler, (project, compiler), cuda=True)
repo(cuda + "_" + compiler, (project, compiler), cuda=True, cuda_repo=cuda)
for mpi in filter(partial(valid_mpi, compiler), mpis):
repo(cuda + "_" + mpi + "_" + compiler,
(project, cuda + "_" + compiler),
......
Markdown is supported
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