directives: forward compat for c, cxx, fortran deps

This commit is contained in:
Harmen Stoppels 2024-08-20 15:49:10 +02:00 committed by Harmen Stoppels
parent ed816d3f0c
commit 907238a7e8

View file

@ -463,6 +463,8 @@ def _depends_on(pkg, spec, when=None, type=dt.DEFAULT_TYPES, patches=None):
dep_spec = spack.spec.Spec(spec) dep_spec = spack.spec.Spec(spec)
if not dep_spec.name: if not dep_spec.name:
raise DependencyError("Invalid dependency specification in package '%s':" % pkg.name, spec) raise DependencyError("Invalid dependency specification in package '%s':" % pkg.name, spec)
elif dep_spec.name in ("c", "cxx", "fortran"): # forward compat for language deps
return
if pkg.name == dep_spec.name: if pkg.name == dep_spec.name:
raise CircularReferenceError("Package '%s' cannot depend on itself." % pkg.name) raise CircularReferenceError("Package '%s' cannot depend on itself." % pkg.name)