Convert problem12 to cmake