cmake: add diagnostic