向开源项目添加冗余的包含卫士 [英] adding redundant include guards to open source project

查看:53
本文介绍了向开源项目添加冗余的包含卫士的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能建议一个程序在冗长的编译时间为大型开放源代码项目添加冗余包含防护吗?我希望能够在每个发行版之后自动添加冗余的包含保护.

Can anyone suggest a program to add redundant include guards to a large open source project with excessive compilation time? I would like to be able to automatically add the redundant include guards after each release.

推荐答案

在文件顶部添加#pragma once即可轻松实现. />
除此之外,您将不得不编写或找到VS的插件,该插件将自动添加保护代码.我自己都不知道.
Easy enough by adding #pragma once to the top of the files.

Other than that, you''ll have to write or find a plug-in for VS that will add the guard code automatically. I don''t know of any myself.


这篇关于向开源项目添加冗余的包含卫士的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆