Refactor RunCMake.build_command test to allow more cases

Move the ErrorsOFF/ON common logic from CMakeLists.txt into an
ErrorsCommon file to allow other test cases to be added that do not use
the Errors test logic.
build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)

If CMAKE_MAKE_PROGRAM is not set fail with an error message instead of
crashing.  Suggest calling project() or enable_language() first to
ensure that CMAKE_MAKE_PROGRAM is set.
CTest: Fail early without PROJECT_BINARY_DIR (#14005)

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.
Merge topic 'cleanup-early-include-CTest-failure' into next

d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005)
2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
4e5cb37 Refactor RunCMake.build_command test to allow more cases