mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Make the 'glob' rule in the project scope to operate relatively to
the 'source-location', not project location. Thanks to Johannes Brunen for the bug report. [SVN r22799]
This commit is contained in:
@@ -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="") ;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user