Home > The Unit Test Framework > Compilation > Direct include

Including the UTF directly into your test module

If you prefer to avoid the standalone library compilation you can either include all files that constitute the static library in your test module's makefile or include them as a part of a test module's source file. To facilitate the later variant the UTF presents the single-header usage variant. In either case no special build options or macro definitions are required to be added to your compilation options list by default. But the same flags that can be used for the standalone library compilation are applicable in this case. Though, obviously, neither BOOST_TEST_DYN_LINK nor BOOST_TEST_NO_LIB are applicable. This solution may not be the best choice in a long run, since it requires the UTF sources recompilation for every test module you use it with and for every change of a test module you are working on. In a result your testing cycle time may increase. If it become tiresome, I recommend switching to one of the prebuilt library usage variants.