def write_footer_of_settings(cmake_file, command_indent, config_expressions,
    has_property_value, **kwargs):
    """ Writes footer of settings block (default value and closes block) """
    default = kwargs['default']
    end_text = kwargs['end_text']
    indent = kwargs['indent']
    if has_property_value:
        if default:
            cmake_file.write('{}    $<$<NOT:$<OR:{}>>:{}>\n'.format(indent +
                command_indent, ','.join(config_expressions), default))
        end_text = end_text.replace('\n', '\n' + indent + command_indent)
        if end_text:
            cmake_file.write('{}{}\n'.format(indent + command_indent, end_text)
                )
