cmake: small improvement of code