def test_paths_set_by_indirect_conditionals():
- t = BoostBuild.Tester(pass_d0=False, use_test_config=False)
+ t = BoostBuild.Tester(use_test_config=False)
header = "child_dir/folder_to_include/some_header.h"
- t.write("jamroot.jam", "build-project child_dir ;")
+ t.write("jamroot.jam", """
+build-project child_dir ;
+rule attach-include-parent ( properties * )
+{
+ return <include>another_folder ;
+}
+# requirements inherited from a parent project will bind paths
+# relative to the project that actually names the rule.
+project : requirements <conditional>@attach-include-parent ;
+""")
t.write("child_dir/jamfile.jam", """\
import remote/remote ;
""")
t.write("child_dir/x.cpp", """\
#include <some_header.h>
+#include <header2.h>
int main() {}
""")
t.write(header, "int some_func();\n")
+ t.write("another_folder/header2.h", "int f2();\n")
t.write("child_dir/folder_to_include/jamfile.jam", "")
expected_x1 = "child_dir/bin/$toolset/debug*/x1.obj"
t.expect_touch(expected_x2)
t.touch(header)
- t.run_build_system(["..", "-d2"], subdir="child_dir/folder_to_include")
+ t.run_build_system([".."], subdir="child_dir/folder_to_include")
t.expect_touch(expected_x1)
t.expect_touch(expected_x2)
test_basic()
test_absolute_paths()
test_ordered_paths()
-test_paths_set_by_indirect_conditionals()
\ No newline at end of file
+test_paths_set_by_indirect_conditionals()