Also switch to pure C.
Add policy CMP0158 to provide compatibility for existing projects. Fixes: #23672