MSYS/MinGW Makfiles: Select the compiler occurring first in PATH

Brad King requested to merge brad.king/cmake:mingw-compiler-PATH into master

Extend the change from !4625 (merged) to apply to the MSYS/MinGW Makefiles generators too. Drop the implied gcc and g++ default compilers. This allows MinGW/Clang environments to work out of the box.

Also simplify selection of windres as the resource compiler. Since commit 957c2aac, windres is selected automatically when using compilers that target the GNU ABI. Drop the generator-specific preference to make behavior more consistent with the Ninja generator.

Fixes: #23542 (closed)

Merge request reports