def add_find_program_override(self, name: str, exe: T.Union[(build.Executable, ExternalProgram, 'OverrideProgram')]) -> None:
    if (name in self.build.searched_programs):
        raise InterpreterException(f'Tried to override finding of executable "{name}" which has already been found.')
    if (name in self.build.find_overrides):
        raise InterpreterException(f'Tried to override executable "{name}" which has already been overridden.')
    self.build.find_overrides[name] = exe
def add_find_program_override(self, name: str, exe: T.Union[(build.Executable, ExternalProgram, 'OverrideProgram')]) -> None:
    if (name in self.build.searched_programs):
        raise InterpreterException(f'Tried to override finding of executable "{name}" which has already been found.')
    if (name in self.build.find_overrides):
        raise InterpreterException(f'Tried to override executable "{name}" which has already been overridden.')
    self.build.find_overrides[name] = exe