def set_backend(self):
    if (self.backend is not None):
        return
    backend = self.coredata.get_builtin_option('backend')
    from .backend import backends
    self.backend = backends.get_backend_from_name(backend, self.build, self)
    if (self.backend is None):
        raise InterpreterException(('Unknown backend "%s".' % backend))
    if (backend != self.backend.name):
        if self.backend.name.startswith('vs'):
            mlog.log('Auto detected Visual Studio backend:', mlog.bold(self.backend.name))
        self.coredata.set_builtin_option('backend', self.backend.name)
    if self.environment.first_invocation:
        self.coredata.init_backend_options(backend)
    options = {k: v for (k, v) in self.environment.cmd_line_options.items() if k.startswith('backend_')}
    self.coredata.set_options(options)
def set_backend(self):
    if (self.backend is not None):
        return
    backend = self.coredata.get_builtin_option('backend')
    from .backend import backends
    self.backend = backends.get_backend_from_name(backend, self.build, self)
    if (self.backend is None):
        raise InterpreterException(('Unknown backend "%s".' % backend))
    if (backend != self.backend.name):
        if self.backend.name.startswith('vs'):
            mlog.log('Auto detected Visual Studio backend:', mlog.bold(self.backend.name))
        self.coredata.set_builtin_option('backend', self.backend.name)
    if self.environment.first_invocation:
        self.coredata.init_backend_options(backend)
    options = {k: v for (k, v) in self.environment.cmd_line_options.items() if k.startswith('backend_')}
    self.coredata.set_options(options)