mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
Made 'include' adjustment for generated headers work when other
targets are specified as sources, not only as dependency properties.
* new/virtual-target.jam (subvariant-dg): Note which sources
are roots of dependency grapgs and record those graphs.
[SVN r16095]
This commit is contained in:
@@ -569,6 +569,17 @@ local rule subvariant-dg ( main-target : properties * : virtual-targets * )
|
||||
for local d in [ $(t).dependencies ]
|
||||
{
|
||||
self.other-dg += [ $(d).dg ] ;
|
||||
}
|
||||
local a = [ $(t).action ] ;
|
||||
if $(a)
|
||||
{
|
||||
for local s in [ $(a).sources ]
|
||||
{
|
||||
if [ $(s).root ]
|
||||
{
|
||||
self.other-dg += [ $(s).dg ] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
self.other-dg = [ sequence.unique $(self.other-dg) ] ;
|
||||
|
||||
@@ -19,5 +19,15 @@ exe c
|
||||
: c.cpp
|
||||
: <define>FOO <dependency>a
|
||||
;
|
||||
|
||||
# Try the same as above, only when other target is specified
|
||||
# not as dependency, but as source
|
||||
|
||||
lib d
|
||||
: y.foo
|
||||
;
|
||||
|
||||
#DEPENDS tra-ra : <./gcc/debug/shared-false/threading-single>x.h ;
|
||||
exe e
|
||||
: e.cpp d
|
||||
: <define>FOO
|
||||
;
|
||||
|
||||
6
test/dependency-test/e.cpp
Normal file
6
test/dependency-test/e.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
#include "x.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
0
test/dependency-test/y.foo
Normal file
0
test/dependency-test/y.foo
Normal file
@@ -9,6 +9,8 @@ t.run_build_system()
|
||||
# Check that main target 'c' was able to find 'x.h' from
|
||||
# 'a's dependency graph
|
||||
t.expect_addition("bin/gcc/debug/main-target-c/c")
|
||||
# Check that main target 'e' was able to find 'y.h'
|
||||
t.expect_addition("bin/gcc/debug/main-target-e/e")
|
||||
|
||||
# Check handling of first level includes.
|
||||
|
||||
|
||||
@@ -569,6 +569,17 @@ local rule subvariant-dg ( main-target : properties * : virtual-targets * )
|
||||
for local d in [ $(t).dependencies ]
|
||||
{
|
||||
self.other-dg += [ $(d).dg ] ;
|
||||
}
|
||||
local a = [ $(t).action ] ;
|
||||
if $(a)
|
||||
{
|
||||
for local s in [ $(a).sources ]
|
||||
{
|
||||
if [ $(s).root ]
|
||||
{
|
||||
self.other-dg += [ $(s).dg ] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
self.other-dg = [ sequence.unique $(self.other-dg) ] ;
|
||||
|
||||
@@ -19,5 +19,15 @@ exe c
|
||||
: c.cpp
|
||||
: <define>FOO <dependency>a
|
||||
;
|
||||
|
||||
# Try the same as above, only when other target is specified
|
||||
# not as dependency, but as source
|
||||
|
||||
lib d
|
||||
: y.foo
|
||||
;
|
||||
|
||||
#DEPENDS tra-ra : <./gcc/debug/shared-false/threading-single>x.h ;
|
||||
exe e
|
||||
: e.cpp d
|
||||
: <define>FOO
|
||||
;
|
||||
|
||||
6
v2/test/dependency-test/e.cpp
Normal file
6
v2/test/dependency-test/e.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
#include "x.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
0
v2/test/dependency-test/y.foo
Normal file
0
v2/test/dependency-test/y.foo
Normal file
@@ -9,6 +9,8 @@ t.run_build_system()
|
||||
# Check that main target 'c' was able to find 'x.h' from
|
||||
# 'a's dependency graph
|
||||
t.expect_addition("bin/gcc/debug/main-target-c/c")
|
||||
# Check that main target 'e' was able to find 'y.h'
|
||||
t.expect_addition("bin/gcc/debug/main-target-e/e")
|
||||
|
||||
# Check handling of first level includes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user