コード例 #1
0
ファイル: installed.py プロジェクト: linearregression/taucmdr
 def __iter__(self):
     """Yield one InstalledCompiler for each role filled by any compiler in this installation."""
     for role in CompilerRole.all():
         try:
             yield self.preferred(role)
         except KeyError:
             pass
コード例 #2
0
ファイル: target.py プロジェクト: linearregression/taucmdr
 def compilers(self):
     """Get information about the compilers used by this target configuration.
      
     Returns:
         InstalledCompilerSet: Collection of installed compilers used by this target.
     """
     eids = []
     compilers = {}
     for role in CompilerRole.all():
         try:
             compiler_command = self.populate(attribute=role.keyword)
         except KeyError:
             continue
         compilers[role.keyword] = compiler_command.info()
         eids.append(compiler_command.eid)
     missing = [role.keyword for role in CompilerRole.tau_required() if role.keyword not in compilers]
     if missing:
         raise InternalError("Target '%s' is missing required compilers: %s" % (self["name"], missing))
     return InstalledCompilerSet("_".join([str(x) for x in eids]), **compilers)