Fix bug of cmake template