Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr
and breaks the expected output matching.
Add a RunCMake.if test to cover if() command behavior. Start with a
test for IS_DIRECTORY cases with an existing directory and a long path,
both with a trailing slash.