[build2] Out of tree assert

Boris Kolpackov boris at codesynthesis.com
Wed Jan 31 14:10:24 UTC 2018


Moldmann Max (DC-MH/ENG52-NA) <Max.Moldmann at boschrexroth-us.com> writes:

> But a colleague was trying to do an out of tree build inside the src
> folder in a bld folder, like this:
> 
> b.exe . at ./bld/
> Assertion failed!
>
> So it seems like you have an assert there, that the bld folder is
> really outside the source tree.

Yes, this is invalid but we shouldn't assert. I could reproduce
this and will look into diagnosing it properly. Thanks for the
report.


> But in my opinion that may limit the user too much.

The fact that src and out directories always have parallel structure
is embedded deep into your "mental model" so I don't think we will
ever change that. Maybe in build3 ;-).

If you want to do this on a regular basis (e.g., you want to check
in the build configurations into the repository), then one way to
work around this limitation is to create a subdirectory in your
project that contains src, for example:

project/
|
|-- bld1/
|-- bld2/
+-- src/

Then do:

b src/@bld1/
b src/@bld2/

Boris



More information about the users mailing list