def generate_possible_compilers(self, specs):
    compilers = all_compilers_in_config()
    cspecs = set([c.spec for c in compilers])
    strict = spack.concretize.Concretizer().check_for_compiler_existence
    for spec in specs:
        for s in spec.traverse():
            if ((not s.compiler) or (not s.compiler.concrete)):
                continue
            if (strict and (s.compiler not in cspecs)):
                raise spack.concretize.UnavailableCompilerVersionError(s.compiler)
            else:
                cspecs.add(s.compiler)
                self.gen.fact(fn.allow_compiler(s.compiler.name, s.compiler.version))
    return cspecs
def generate_possible_compilers(self, specs):
    compilers = all_compilers_in_config()
    cspecs = set([c.spec for c in compilers])
    strict = spack.concretize.Concretizer().check_for_compiler_existence
    for spec in specs:
        for s in spec.traverse():
            if ((not s.compiler) or (not s.compiler.concrete)):
                continue
            if (strict and (s.compiler not in cspecs)):
                raise spack.concretize.UnavailableCompilerVersionError(s.compiler)
            else:
                cspecs.add(s.compiler)
                self.gen.fact(fn.allow_compiler(s.compiler.name, s.compiler.version))
    return cspecs