()
| 10 | |
| 11 | |
| 12 | def test_basic(): |
| 13 | t = BoostBuild.Tester(["-d3", "-d+12"], pass_d0=False, use_test_config=False) |
| 14 | |
| 15 | t.write("a.cpp", """ |
| 16 | #include <a.h> |
| 17 | # include "a.h" |
| 18 | #include <x.h> |
| 19 | int main() {} |
| 20 | """) |
| 21 | t.write("a.h", "\n") |
| 22 | t.write("a_c.c", """\ |
| 23 | #include <a.h> |
| 24 | # include "a.h" |
| 25 | #include <x.h> |
| 26 | """) |
| 27 | t.write("b.cpp", """\ |
| 28 | #include "a.h" |
| 29 | int main() {} |
| 30 | """) |
| 31 | t.write("b.h", "\n") |
| 32 | t.write("c.cpp", """\ |
| 33 | #include "x.h" |
| 34 | int main() {} |
| 35 | """) |
| 36 | t.write("e.cpp", """\ |
| 37 | #include "x.h" |
| 38 | int main() {} |
| 39 | """) |
| 40 | t.write("x.foo", "") |
| 41 | t.write("y.foo", "") |
| 42 | |
| 43 | t.write("src1/a.h", '#include "b.h"\n') |
| 44 | t.write("src1/b.h", '#include "c.h"\n') |
| 45 | t.write("src1/c.h", "\n") |
| 46 | t.write("src1/z.h", """\ |
| 47 | extern int dummy_variable_suppressing_empty_file_warning_on_hp_cxx_compiler; |
| 48 | """) |
| 49 | |
| 50 | t.write("src2/b.h", "\n") |
| 51 | |
| 52 | t.write("jamroot.jam", """\ |
| 53 | import foo ; |
| 54 | import types/cpp ; |
| 55 | import types/exe ; |
| 56 | |
| 57 | project test : requirements <include>src1 ; |
| 58 | |
| 59 | exe a : x.foo a.cpp a_c.c ; |
| 60 | exe b : b.cpp ; |
| 61 | |
| 62 | # Because of <define>FOO, c.cpp will be compiled to a different directory than |
| 63 | # everything for main target "a". Therefore, without <implicit-dependency>, C |
| 64 | # preprocessor processing that module will not find "x.h", which is part of |
| 65 | # "a"'s dependency graph. |
| 66 | # |
| 67 | # -------------------------- |
| 68 | # More detailed explanation: |
| 69 | # -------------------------- |
no test coverage detected