cmake: Avoid test compilation

Change-Id: I0ae176c24a580952ee4260e2049b642f41676e93