MCPcopy Create free account
hub / github.com/boostorg/build / test_alias_source_usage_requirements

Function test_alias_source_usage_requirements

v2/test/alias.py:65–92  ·  view source on GitHub ↗

Check whether usage requirements are propagated via "alias". In case they are not, linking will fail as there will be no main() function defined anywhere in the source.

(t)

Source from the content-addressed store, hash-verified

63###############################################################################
64
65def test_alias_source_usage_requirements(t):
66 """
67 Check whether usage requirements are propagated via "alias". In case they
68 are not, linking will fail as there will be no main() function defined
69 anywhere in the source.
70
71 """
72 t.write("jamroot.jam", """\
73lib l : l.cpp : : : <define>WANT_MAIN ;
74alias la : l ;
75exe main : main.cpp la ;
76""")
77
78 t.write("l.cpp", """\
79void
80#if defined(_WIN32)
81__declspec(dllexport)
82#endif
83foo() {}
84""")
85
86 t.write("main.cpp", """\
87#ifdef WANT_MAIN
88int main() {}
89#endif
90""")
91
92 t.run_build_system()
93
94
95###############################################################################

Callers 1

alias.pyFile · 0.85

Calls 2

run_build_systemMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected