Honour use-requirements for dependency properties.

[SVN r15964]
This commit is contained in:
Vladimir Prus 2002-10-23 10:39:23 +00:00
parent cf27bfba70
commit 6354355cbe
4 changed files with 40 additions and 2 deletions

View File

@ -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
{

View File

@ -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", """

View File

@ -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
{

View File

@ -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", """