I feel I must be missing something obvious, but are alias requirements supposed
to work? Consider this simple case: alias src : a.cpp b.cpp : <define>FOO ; exe e : main.cpp src ; Here both a.cpp and b.cpp get built without FOO being defined. Changing 'alias' with 'lib' fixes the things and causes FOO to be properly defined for a.cpp and b.cpp. This is somewhat similar to http://lists.boost.org/boost-build/2009/04/21616.php, and I really don't see why either shouldn't work. http://www.boost.org/boost-build2/doc/html/bbv2/tasks/alias.html seems to suggest this to be a supported use case (the 'threads' example), so is this a bug or a misunderstanding of 'alias' on my part? Thanks, Gevorg P.S. Using Boost.Build shipped with Boost 1.44 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
On Monday, November 29, 2010 10:53:17 Gevorg Voskanyan wrote:
> I feel I must be missing something obvious, but are alias requirements > supposed to work? Consider this simple case: > > alias src : a.cpp b.cpp : <define>FOO ; This says: Whenever somebody asks for 'src', take metargets a.cpp and b.cpp, and generate them with <define>FOO, then return result. However, given that a.cpp and b.cpp are source files, generating them merely creates targets, and <define>FOO is not used in any way. > exe e : main.cpp src ; > > Here both a.cpp and b.cpp get built without FOO being defined. Changing > 'alias' with 'lib' fixes the things and causes FOO to be properly defined > for a.cpp and b.cpp. Yes, because in that case, <define>FOO applies to the 'lib' target, and 'lib' target can make some use of it. Does this clarifies things? -- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: http://boost.org/boost-build2 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
Vladimir Prus wrote:
> On Monday, November 29, 2010 10:53:17 Gevorg Voskanyan wrote: > > I feel I must be missing something obvious, but are alias requirements > > supposed to work? Consider this simple case: > > > > alias src : a.cpp b.cpp : <define>FOO ; > > This says: > > Whenever somebody asks for 'src', take metargets a.cpp and b.cpp, and > generate them with <define>FOO, then return result. > > However, given that a.cpp and b.cpp are source files, generating them merely > creates targets, and <define>FOO is not used in any way. I *think* I see what you mean, however the following variation confuses things for me again: obj a : a.cpp ; obj b : b.cpp ; alias src : a b : <define>FOO ; As far as I understand, this time 'a' and 'b' are proper metatargets, and generating them with <define>FOO should work. But I just tried it and <define>FOO wasn't present this time either. > > exe e : main.cpp src ; > > > > Here both a.cpp and b.cpp get built without FOO being defined. Changing > > 'alias' with 'lib' fixes the things and causes FOO to be properly defined > > for a.cpp and b.cpp. > > Yes, because in that case, <define>FOO applies to the 'lib' target, and 'lib' > target can make some use of it. > > Does this clarifies things? > -- > Vladimir Prus > http://vladimir_prus.blogspot.com > Boost.Build: http://boost.org/boost-build2 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
Free forum by Nabble | Edit this page |