try_compile: Use CMAKE_<lang>_COMPILER_LAUNCHER
When doing a clean build with a warm compiler cache, the time to configure is often disproportionally longer than the time to build. The reason is that CMAKE_<lang>_COMPILER_LAUNCHER
is used for building, but not during the configure step.
This is surprising, because speeding up the configure step is a prime use case for compiler caches.
Quote from Ted's Mozilla Blog:
It actually lowered the time we spent running our configure script by about 40% on our Linux builds and 20% on our OS X builds, which makes some sense because configure invokes the compiler quite a few times, and when using ccache or sccache it will invoke the compiler using that tool.