diff --git a/v2/build/project.jam b/v2/build/project.jam index 08404b269..735636a85 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -600,7 +600,7 @@ module project-rules import path ; import project ; - local location = [ project.attribute $(__name__) location ] ; + local location = [ project.attribute $(__name__) source-location ] ; local all-paths = [ path.glob $(location) : $(wildcards) ] ; return $(all-paths:D="") ; } diff --git a/v2/test/glob.py b/v2/test/glob.py index 2c34709bd..cd8f67544 100644 --- a/v2/test/glob.py +++ b/v2/test/glob.py @@ -45,5 +45,22 @@ t.rm("d2/d/bin") t.run_build_system(subdir="d2/d") t.expect_addition("d2/d/bin/$toolset/debug/l.dll") +# Test that when 'source-location' is explicitly-specified +# glob works relatively to source location +t.rm("d1") + +t.write("d1/src/a.cpp", """ +int main() { return 0; } + +""") + +t.write("d1/Jamfile", """ +project : source-location src ; +exe a : [ glob *.cpp ] ../d2/d//l ; +""") + +t.run_build_system(subdir="d1") +t.expect_addition("d1/bin/$toolset/debug/a.exe") + t.cleanup()