def gcc_compiler(name): if name == '': compiler = find_gcc_compiler() else: compiler = GccCompiler(name) if compiler is None: raise argparse.ArgumentTypeError( f"Couldn't automatically find gcc compiler") elif not compiler.is_valid(): raise argparse.ArgumentTypeError( f"Program {compiler} is not a supported gcc compiler") return compiler
def find_compiler(self) -> Optional[Compiler]: return find_gcc_compiler() or find_clang_compiler()
def find_compiler(self) -> Optional[Compiler]: if self.gpu: return find_nvcc_compiler() else: return find_gcc_compiler() or find_clang_compiler()