Boost Build,无法找到文件或目标 x
我有一个 Jamroot 文件,看起来有点像这样;
project foo ;
alias bar ./src/path/to/bar//bar
build-project bar ;
总是给出恼人的错误
error: Unable to find file or target named
error: '/foo//bar/'
error: referred from project at
error: '.'
运行;
bjam --debug-building
building project Jamfile</home/chris/code/foo> ('object(project-target)@163') with
{.. as above ...}
根本没有帮助。
如果我将目录更改为文件夹并输入 bjam,则项目的该部分将完美构建。
作为解决方法,我有一个脚本可以在所有文件夹中执行此操作,但我很想知道为什么“正确”的方法不起作用。
我正在使用以下版本的 bjam
bjam --version
Boost.Build V2 (Milestone 12)
Boost.Jam 03.1.16
非常感谢
I have a Jamroot file which looks a bit like this;
project foo ;
alias bar ./src/path/to/bar//bar
build-project bar ;
Always gives the annoying error
error: Unable to find file or target named
error: '/foo//bar/'
error: referred from project at
error: '.'
Running with;
bjam --debug-building
building project Jamfile</home/chris/code/foo> ('object(project-target)@163') with
{.. as above ...}
No help at all.
If I change directory into the folder and type bjam, that part of the project builds perfectly.
As a workaround I have a script that does this in all the folders, but I would love to know why the 'proper' way doesn't work.
I'm using the following version of bjam
bjam --version
Boost.Build V2 (Milestone 12)
Boost.Jam 03.1.16
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现我实际上不需要这样做;只需在 Jamroot 中将子项目列为别名就足以让 bjam 构建它们。
因此,构建项目步骤是不必要且错误的。
我还从 Boost 中找到了这一点构建参考页面;
构建项目;导致建立一些其他项目。该规则采用单个参数 - 相对于包含 Jamfile 的目录名称。当构建包含的 Jamfile 时,位于该目录的项目也将被构建。目前,该规则的参数应该是目录名称。 不允许项目 ID 或一般目标引用。”(我的突出显示)
I have discovered that I don't actually need to do this; simply listing the sub projects as aliases in the Jamroot is enough to get bjam to build them.
So the build-project steps are unneeded and wrong.
I also found this from Boost build reference page;
build-project; Cause some other project to be built. This rule takes a single parameter—a directory name relative to the containing Jamfile. When the containing Jamfile is built, the project located at that directory will be built as well. At the moment, the parameter to this rule should be a directory name. Project ID or general target references are not allowed." (my highlighting)