Finding all of the unit tests

I have been making a library that uses Juce core internally, but does not expose any of juce to the library user. Most implementation files contain a unit test battery. I copy the style used in the main JUCE library, by adding unit tests at the end of class implementations, then declaring a static instance of the class.

I have another cpp file that deals with the unit tests, but a call to UnitTest::getAllTests() will only find the tests if i actually #include all of the cpp files in there - which is wacky at best. What is the work around? I do not see any of this wacky including going on in Juce.