make try_run log its output
I recently stumpled on an issue such as https://github.com/pytorch/pytorch/issues/30896 where try_run
is used to detect a feature presence but which unexpectedly fails.
I checked the CMakeOutput.log and CMakeError.log and was surprised to find nothing related to those invocations.
I'd hence propose that try_run
logs its compile/link/run invocation and resulting output and error messages into a log file.