()
| 12 | |
| 13 | |
| 14 | def test_basic(): |
| 15 | t = BoostBuild.Tester() |
| 16 | __write_appender(t, "appender.jam") |
| 17 | t.write("a.cpp", "") |
| 18 | t.write("b.cxx", "") |
| 19 | t.write("c.tui", "") |
| 20 | t.write("d.wd", "") |
| 21 | t.write("e.cpp", "") |
| 22 | t.write("x.l", "") |
| 23 | t.write("y.x_pro", "") |
| 24 | t.write("z.cpp", "") |
| 25 | t.write("lib/c.cpp", "int bar() { return 0; }\n") |
| 26 | t.write("lib/jamfile.jam", "my-lib auxilliary : c.cpp ;") |
| 27 | t.write("jamroot.jam", |
| 28 | r"""import appender ; |
| 29 | |
| 30 | import "class" : new ; |
| 31 | import generators ; |
| 32 | import type ; |
| 33 | |
| 34 | |
| 35 | ################################################################################ |
| 36 | # |
| 37 | # We use our own custom EXE, LIB & OBJ target generators as using the regular |
| 38 | # ones would force us to have to deal with different compiler/linker specific |
| 39 | # 'features' that really have nothing to do with this test. For example, IBM XL |
| 40 | # C/C++ for AIX, V12.1 (Version: 12.01.0000.0000) compiler exits with a non-zero |
| 41 | # exit code and thus fails our build when run with a source file using an |
| 42 | # unknown suffix like '.marked_cpp'. |
| 43 | # |
| 44 | ################################################################################ |
| 45 | |
| 46 | type.register MY_EXE : my_exe ; |
| 47 | type.register MY_LIB : my_lib ; |
| 48 | type.register MY_OBJ : my_obj ; |
| 49 | |
| 50 | appender.register compile-c : C : MY_OBJ ; |
| 51 | appender.register compile-cpp : CPP : MY_OBJ ; |
| 52 | appender.register link-lib composing : MY_OBJ : MY_LIB ; |
| 53 | appender.register link-exe composing : MY_OBJ MY_LIB : MY_EXE ; |
| 54 | |
| 55 | |
| 56 | ################################################################################ |
| 57 | # |
| 58 | # LEX --> C |
| 59 | # |
| 60 | ################################################################################ |
| 61 | |
| 62 | type.register LEX : l ; |
| 63 | |
| 64 | appender.register lex-to-c : LEX : C ; |
| 65 | |
| 66 | |
| 67 | ################################################################################ |
| 68 | # |
| 69 | # /--> tUI_H --\ |
| 70 | # tUI --< >--> CPP |
| 71 | # \------------/ |
no test coverage detected