Added static tests to the cmakefile

Probably broken on windows. Will fix that next.