def check_cpp_symbol(conf, symbol, headers=None):
    code = []
    if headers:
        for h in headers:
            code.append(r"#include <%s>" % h)

    code.append(r"""
int main()
{
#ifndef %s
    (void) %s;
#endif
    ;
    return 0;
}
""" % (symbol, symbol))
    src = "\n".join(code)

    conf.start_message("Checking for declaration %s" % symbol)
    ret = conf.builders["ctasks"].try_compile("check_cpp_symbol", src, headers)
    conf.conf_results.append({"type": "decl", "value": symbol,
                              "result": ret})
    if ret:
        conf.end_message("yes")
    else:
        conf.end_message("no")
    return ret
dataset/ETHPy150Open cournape/Bento/bento/private/_yaku/yaku/conftests/conftests.py/check_cpp_symbol/original