FIX some tests weren't compiling, ctest did not depend built tests

also added cmake function to make testing adding tests easier.