敏感间歇性并行构建问题(cmake)
我正在尝试调试 cmake 构建系统中围绕某些生成文件的间歇性并行构建问题。然而,很难可靠地测试或重现该问题。
有谁知道有什么方法可以加剧此类问题或使其敏感化吗?或者其他调试它们的策略?
I am trying to debug an intermittent parallel build issue in my cmake build system around some generated files. It is however difficult to reliably test or reproduce the issue.
Does anyone know any way to exacerbate or sensitise such issues? Or other strategies for debugging them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能缺少 add_dependency 来强制一个目标在另一个目标开始之前完全构建,或者在多个库中使用 add_custom_command 输出。
如果两个库同时开始构建,并且它们同时触发运行自定义命令,那么您将运行两个竞争的自定义命令,并且它们可能会覆盖彼此的结果,或混合结果。
你的代码是公开的吗?可以发布给其他人检查吗?
一个好的策略就是将其暴露给其他开发人员以获得“更多的关注”......
It is likely a missing add_dependencies to force one target to build completely before another begins, or an add_custom_command output that is used in more than one library.
If both libraries start building at the same time, and they both trigger running the custom command at the same time, then you'll get two competing custom commands running, and they may overwrite each other's results, or intermingle results.
Is your code public? Can you post it for others to inspect?
One good strategy is simply exposing it to other developers for "more eyes"...