将整个程序与复杂的构建过程结合起来
我想在我的系统上运行夹板整个程序分析。然而,系统非常大,不同的部分是使用不同的编译器定义和包含路径进行编译的。我可以看到如何将这些信息传递给单个文件的夹板,但我不知道如何为整个程序执行此操作。有谁知道这样做的方法吗?
I want to run splints whole program analysis on my system. However the system is quite large and different parts are compiled with different compiler defines and include paths. I can see how to convey this information to splint for a single file but I can't figure out how to do it for whole program. Does anyone know a way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您有一个 Makefile,您可以创建一个新目标;然后您将使用 Splint 而不是编译器来完成实际的编译步骤复制它们。
然而,我的建议是反对完整计划的方法。如果您可以将系统隔离为单独的部分,我宁愿从一一检查它们开始。由于您的程序“相当大”,因此您的每个模块都会出现无数警告...。一旦您在源代码中添加了适当的语义注释,您将开始摆脱它们。祝你好运! :)
Assuming you have a
Makefile
you could create a new target; then you would go through the actual compilation steps to duplicate them using Splint instead of the compiler.My advice, however, is against the full-program approach. If you can isolate your system into separate parts, I'd rather start by checking them, one by one. Since your program is "quite large", expect a gazillion warnings... for each one of your modules. You will start to get rid of them once you have sprinkled your source code with the appropriate semantic annotations. Good luck! :)