def cmake_cache_option(name, boolean_value, comment=""):
    """Generate a string for a cmake configuration option"""
    value = "ON" if boolean_value else "OFF"
    return 'set(%s %s CACHE BOOL "%s")\n\n' % (name, value, comment)