[build2] Rerunning build2 and getting different results (errors)
Wilhelm Meier
wilhelm.meier at hs-kl.de
Tue May 16 14:38:21 UTC 2023
On 16.05.23 15:23, Boris Kolpackov wrote:
> Wilhelm Meier via users <users at build2.org> writes:
>
>> https://github.com/wimalopaan/build2_test
>>
>> [...]
>>
>> Please give me some hints.
>
> I gave the hint and the reference to the relevant documentation in my
> previous reply: you need to include buildfiles that declare targets
> that you reference. Specifically, your src/test/buildfile should be:
>
> ```
> include ../libs/A/
> include ../libs/B/
>
> exe{test}: cxx{test} ../libs/A/lib{A} ../libs/B/lib{B}
> ```
Thank you for your reply. But this does not change anything. Sometimes I
get:
---
rm src/test/exe{test}
rm src/test/obje{test}
rm src/libs/B/bmis{b}
rm src/libs/A/bmis{a}
c++ src/libs/B/mxx{b} -> src/libs/B/bmis{b}
c++ src/test/cxx{test} -> src/test/obje{test}
c++ src/libs/A/mxx{a} -> src/libs/A/bmis{a}
ld src/test/exe{test}
---
and sometimes
---
rm src/test/exe{test}
rm src/test/obje{test}
rm src/libs/B/bmis{b}
rm src/libs/A/bmis{a}
c++ src/test/cxx{test} -> src/test/obje{test}
c++ src/libs/B/mxx{b} -> src/libs/B/bmis{b}
c++ src/libs/A/mxx{a} -> src/libs/A/bmis{a}
ld src/test/exe{test}
---
or other permutations of the compilation.
This is exact the same result as for my original version in the github,
where the inclusion takes place one directory above (and the paths where
accordingly).
>
> If you want to be fancy, you can add an export stub for lib{A} and lib{B}
> in which case you will be able to write:
>
> ```
> import libs = lib{A} lib{B}
>
> exe{test}: cxx{test} $libs
> ```
The import version I have to look at, my first try (which was mainly the
same you suggested, was not successful.
Thank you very much,
Wilhelm
More information about the users
mailing list