Simplified the cmake code that deals with the unit tests.