2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00

Updated Boost Build documentation to note that the virtual-target.register rule should be called for each created virtual-target instance and not only to remove duplicates when there is a chance of creating multiple matching virtual targets. Without this call, Boost Build fails to track which virtual targets get created for each metatarget.

[SVN r79996]
This commit is contained in:
Jurko Gospodnetić
2012-08-13 05:11:50 +00:00
parent a0a4734b88
commit f144b75d02

View File

@@ -181,8 +181,9 @@ local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ;
once with the same properties. Returning to different instance of <classname>file-target</classname>
that correspond to the same file clearly will result in problems. Therefore, whenever
returning targets you should pass them via the <code>virtual-target.register</code>
function, that will replace targets with previously created identical ones, as
necessary.<footnote><para>This create-then-register pattern is caused by limitations
function, besides allowing Boost Build to track which virtual targets
got created for each metatarget, this will also replace targets with previously created identical
ones, as necessary.<footnote><para>This create-then-register pattern is caused by limitations
of the Boost.Jam language. Python port is likely to never create duplicate targets.</para></footnote>
Here are a couple of examples:
<programlisting>