2
0
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:
Steven Watanabe
2008-07-18 03:25:20 +00:00
parent 6b5b66240e
commit ca7748efe2
3 changed files with 47 additions and 1 deletions

View 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()

View File

@@ -169,6 +169,7 @@ tests = [ "rebuilds",
"free_features_request",
"file_name_handling",
"sort_rule",
"ordered_include",
"inherited_dependency"
]

View File

@@ -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=) "&&" ] ] ;
}
}