GCC 10 breaks compile flag detection
All my apologies if this is already known, I could not find another issue about this.
The REGEX_FAIL currently used to check invalid GCC flags (https://gitlab.kitware.com/cmake/cmake/-/blob/b1898bf97570b2887f7398105231ff72adb1564d/Modules/CheckCompilerFlag.cmake#L48) is broken with GCC 10 which emit warnings looking like command-line option .* is valid for .* but not for
(notice the additional dash between command and line). The message was updated recently: https://gcc.gnu.org/git/?p=gcc.git;a=commit;f=gcc/opts-global.c;h=0ecf545c6e542cc5eee78eac97d200b55e11001f.
I would be happy to send a Merge request to update the regex to command[ -]line option .* is valid for .* but not for XXX
instead.