mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Make c-scanner search directories specified
with <include>a&&b * tools/buitin.jam (c-scanner.__init__) split includes at && * test/test_all.py test/ordered_include.py Test case for this fix. [SVN r47537]
This commit is contained in:
43
v2/test/ordered_include.py
Normal file
43
v2/test/ordered_include.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Copyright (c) 2008 Steven Watanabe
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See
|
||||
# accompanying file LICENSE_1_0.txt) or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
from BoostBuild import Tester
|
||||
|
||||
tester = Tester()
|
||||
|
||||
tester.write("Jamroot", """
|
||||
obj test : test.cpp : <include>a&&b ;
|
||||
""")
|
||||
|
||||
tester.write("test.cpp", """
|
||||
#include <test1.hpp>
|
||||
#include <test2.hpp>
|
||||
|
||||
int main() {
|
||||
}
|
||||
""")
|
||||
|
||||
tester.write("a/test1.hpp", """
|
||||
""")
|
||||
|
||||
tester.write("b/test2.hpp", """
|
||||
""")
|
||||
|
||||
tester.run_build_system()
|
||||
|
||||
tester.expect_addition("bin/$toolset/debug/test.obj")
|
||||
|
||||
tester.touch("a/test1.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
|
||||
tester.touch("b/test2.hpp")
|
||||
tester.run_build_system()
|
||||
tester.expect_touch("bin/$toolset/debug/test.obj")
|
||||
|
||||
tester.cleanup()
|
||||
@@ -169,6 +169,7 @@ tests = [ "rebuilds",
|
||||
"free_features_request",
|
||||
"file_name_handling",
|
||||
"sort_rule",
|
||||
"ordered_include",
|
||||
"inherited_dependency"
|
||||
]
|
||||
|
||||
|
||||
@@ -386,6 +386,7 @@ class c-scanner : scanner
|
||||
import path ;
|
||||
import regex ;
|
||||
import scanner ;
|
||||
import sequence ;
|
||||
import virtual-target ;
|
||||
|
||||
rule __init__ ( includes * )
|
||||
@@ -394,7 +395,8 @@ class c-scanner : scanner
|
||||
|
||||
for local i in $(includes)
|
||||
{
|
||||
self.includes += [ path.native $(i:G=) ] ;
|
||||
self.includes += [ sequence.transform path.native
|
||||
: [ regex.split $(i:G=) "&&" ] ] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user