I believe this is not a true bug.
You are simply missing the other define CUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS.
When using CUNIT_BUILD_TESTS, you need the above as well