def _get_default_compiler(output):
    cc = os.environ.get("CC", "")
    cxx = os.environ.get("CXX", "")
    if cc or cxx:  # Env defined, use them
        output.info("CC and CXX: %s, %s " % (cc or "None", cxx or "None"))
        command = cc or cxx
        if "gcc" in command:
            return _gcc_compiler(output, command)
        if "clang" in command.lower():
            return _clang_compiler(output, command)
        # I am not able to find its version
        output.error("Not able to automatically detect '%s' version" % command)
        return None

    if platform.system() == "Windows":
        vs = _visual_compiler_last(output)
    gcc = _gcc_compiler(output)
    clang = _clang_compiler(output)

    if platform.system() == "Windows":
        return vs or gcc or clang
    elif platform.system() == "Darwin":
        return clang or gcc
    else:
        return gcc or clang
dataset/ETHPy150Open conan-io/conan/conans/client/detect.py/_get_default_compiler/original