cmake: Do not add tests if tests are disabled

Change-Id: I6bb6cb5ebd623d207d273037664d50060722f896