Honour use-requirements for dependency properties.
[SVN r15964]
This commit is contained in:
parent
cf27bfba70
commit
6354355cbe
@ -400,7 +400,7 @@ rule basic-target ( name : project
|
||||
if dependency in [ feature.attributes $(p:G) ]
|
||||
{
|
||||
local g = [ generate-source $(p:G=) : $(properties) ] ;
|
||||
xproperties += $(p:G)$(g) ;
|
||||
xproperties += $(p:G)$(g) [ $(g).use-requirements ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -21,6 +21,25 @@ t.run_build_system()
|
||||
|
||||
t.run_build_system("--clean")
|
||||
|
||||
# Test that use requirements on main target work, when they are referred using
|
||||
# 'dependency' features.
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("Jamfile", """
|
||||
lib b : b.cpp : : : <define>FOO ;
|
||||
exe a : a.cpp : <dependency>b ;
|
||||
""")
|
||||
t.write("b.cpp", "void foo() {}")
|
||||
t.write("a.cpp", """
|
||||
#ifdef FOO
|
||||
int main() {}
|
||||
#endif
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.run_build_system("--clean")
|
||||
|
||||
|
||||
# Test that use requirement on project work
|
||||
t.write("Jamfile", "exe a : a.cpp lib/b ;")
|
||||
t.write("lib/Jamfile", """
|
||||
|
@ -400,7 +400,7 @@ rule basic-target ( name : project
|
||||
if dependency in [ feature.attributes $(p:G) ]
|
||||
{
|
||||
local g = [ generate-source $(p:G=) : $(properties) ] ;
|
||||
xproperties += $(p:G)$(g) ;
|
||||
xproperties += $(p:G)$(g) [ $(g).use-requirements ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -21,6 +21,25 @@ t.run_build_system()
|
||||
|
||||
t.run_build_system("--clean")
|
||||
|
||||
# Test that use requirements on main target work, when they are referred using
|
||||
# 'dependency' features.
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("Jamfile", """
|
||||
lib b : b.cpp : : : <define>FOO ;
|
||||
exe a : a.cpp : <dependency>b ;
|
||||
""")
|
||||
t.write("b.cpp", "void foo() {}")
|
||||
t.write("a.cpp", """
|
||||
#ifdef FOO
|
||||
int main() {}
|
||||
#endif
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.run_build_system("--clean")
|
||||
|
||||
|
||||
# Test that use requirement on project work
|
||||
t.write("Jamfile", "exe a : a.cpp lib/b ;")
|
||||
t.write("lib/Jamfile", """
|
||||
|
Loading…
Reference in New Issue
Block a user