mity / acutest

Simple header-only C/C++ unit testing facility.
MIT License
346 stars 96 forks source link

How can I compile multiple units to one executable? #59

Closed andigor closed 3 years ago

mity commented 3 years ago

Define TEST_NO_MAIN prior including acutest.h in all the compilation units but one.

(Or alternatively, propagate it from your build system via compiler's command line option, typically -DTEST_NO_MAIN, and #undef it in exactly one compilation unit.)