fix cmake buildsystem for building with testing on.