Make sure that the #include scanner finds the headers
()
| 179 | test_merge_recursive_existing(["dir4-link"], ["dir5-link", "dir4-link"]) |
| 180 | |
| 181 | def test_include_scan(): |
| 182 | """Make sure that the #include scanner finds the headers""" |
| 183 | t = BoostBuild.Tester() |
| 184 | t.write("jamroot.jam", """\ |
| 185 | import link ; |
| 186 | link-directory dir1-link : src/dir1/include : <location>. ; |
| 187 | link-directory dir2-link : src/dir2/include : <location>. ; |
| 188 | obj test : test.cpp : |
| 189 | <include>include |
| 190 | <implicit-dependency>dir1-link |
| 191 | <implicit-dependency>dir2-link ; |
| 192 | """) |
| 193 | |
| 194 | t.write("src/dir1/include/file1.h", "#include <file2.h>\n") |
| 195 | t.write("src/dir2/include/file2.h", "int f();\n") |
| 196 | t.write("test.cpp", """\ |
| 197 | #include <file1.h> |
| 198 | int main() { f(); } |
| 199 | """); |
| 200 | |
| 201 | t.run_build_system(["test"]) |
| 202 | |
| 203 | t.expect_addition("bin/$toolset/debug/test.obj") |
| 204 | |
| 205 | t.run_build_system() |
| 206 | t.expect_nothing_more() |
| 207 | |
| 208 | t.cleanup() |
| 209 | |
| 210 | def test_include_scan_merge_existing(): |
| 211 | """Make sure that files are replaced if needed when merging in |
no test coverage detected