敏感间歇性并行构建问题(cmake)

发布于 2024-11-26 18:38:51 字数 108 浏览 1 评论 0原文

我正在尝试调试 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独孤求败 2024-12-03 18:38:51

可能缺少 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"...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文