Uncache CMAKE_EXECUTABLE_FORMAT if the compiler fails
If the compiler ends up failing, we've already decided on an executable format which is probably Unknown
at this point. However, in Ninja, ELF
needs to be known when rpaths are involved since it does not support the relink step.
I guess the best way would be to have it finally be part of CompilerId detection like the cmGeneratorTarget
comment says.
Cc: @brad.king