Re-implement the build_command() command to use "cmake --build" instead
of generating a native build tool invocation directly. This command
will internally invoke the proper native build tool.
This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce
a string so that it can be later refactored to produce a vector with no
quoting or escaping. It will also allow us to later teach CMake to
delay the decision about which build tool to invoke until after the
project build system is generated to disk. For example, on Visual
Studio 10 and above the preferred command-line tool is MSBuild, but we
need to fall back to devenv if the .sln has Intel Fortran .vfproj files.
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.
Do not use PROJECT_BINARY_DIR before it is defined. If it is not
defined when needed, fail with an error message suggesting that the
project() command be invoked first.