سؤال

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

هل كانت مفيدة؟

المحلول

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)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top