def configure(self, candidates=None):
        ctx = self.ctx
        if candidates is None:
            if sys.platform == "win32":
                candidates = ["msvc", "gxx"]
            else:
                candidates = ["gxx", "cxx"]

        def _detect_cxx():
            detected = None
            sys.path.insert(0, os.path.dirname(yaku.tools.__file__))
            try:
                for cxx_type in candidates:
                    sys.stderr.write("Looking for %s (c++ compiler) ... " % cxx_type)
                    try:
                        mod = __import__(cxx_type)
                        if mod.detect(ctx):
                            sys.stderr.write("yes\n")
                            detected = cxx_type
                            break
                    except __HOLE__:
                        raise
                    except:
                        pass
                    sys.stderr.write("no!\n")
                return detected
            finally:
                sys.path.pop(0)

        cxx_type = _detect_cxx()
        if cxx_type is None:
            raise ValueError("No CXX compiler found!")
        cxx = ctx.load_tool(cxx_type)
        cxx.setup(ctx)

        if sys.platform != "win32":
            ar = ctx.load_tool("ar")
            ar.setup(ctx)
        self.configured = True
dataset/ETHPy150Open cournape/Bento/bento/private/_yaku/yaku/tools/cxxtasks.py/CXXBuilder.configure