With the Makefile and Ninja generators we expect that touching the input
source file for a try_compile will cause CMake to re-run on the next
build. Extend the RunCMake.try_compile test with a case covering this.
Also check that CMake does not re-run if nothing has changed.