Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Detecting "unrecognized command line option" errors with GCC
Alpha:
--- Quote from: oBFusCATed on June 24, 2012, 10:48:45 am ---Alpha: no one stops you from having two working copies :)
--- End quote ---
(Hit forehead.) Wow; sometimes I even surprise myself at my lack of ability to see the obvious.
Alpha:
--- Code: ---Index: src/plugins/compilergcc/compilerGNUARM.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUARM.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerGNUARM.cpp (working copy)
@@ -220,6 +220,7 @@
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
}
AutoDetectResult CompilerGNUARM::AutoDetectInstallationDir()
Index: src/plugins/compilergcc/compilerGNUAVR.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUAVR.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerGNUAVR.cpp (working copy)
@@ -260,6 +260,7 @@
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
} // end of LoadDefaultRegExArray
AutoDetectResult CompilerGNUAVR::AutoDetectInstallationDir()
Index: src/plugins/compilergcc/compilerGNUTRICORE.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUTRICORE.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerGNUTRICORE.cpp (working copy)
@@ -211,6 +211,7 @@
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
}
AutoDetectResult CompilerGNUTRICORE::AutoDetectInstallationDir()
Index: src/plugins/compilergcc/compilerGNUPOWERPC.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUPOWERPC.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerGNUPOWERPC.cpp (working copy)
@@ -214,6 +214,7 @@
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
}
AutoDetectResult CompilerGNUPOWERPC::AutoDetectInstallationDir()
Index: src/plugins/compilergcc/compilerGNUMSP430.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUMSP430.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerGNUMSP430.cpp (working copy)
@@ -287,6 +287,7 @@
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
}
AutoDetectResult CompilerGNUMSP430::AutoDetectInstallationDir()
Index: src/plugins/compilergcc/compilerMINGW.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGW.cpp (revision 8065)
+++ src/plugins/compilergcc/compilerMINGW.cpp (working copy)
@@ -230,6 +230,7 @@
m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("Linker error (cannot open output file)"), cltError, _T(".*(ld.*):[ \t](cannot open output file.*):[ \t](.*)"), 2, 1, 0, 3));
m_RegExes.Add(RegExStruct(_("Linker error (unrecognized option)"), cltError, _T(".*(ld.*):[ \t](unrecognized option.*)"), 2, 1));
+ m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));
m_RegExes.Add(RegExStruct(_("No such file or directory"), cltError, _T(".*:(.*):[ \t](No such file or directory.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
--- End code ---
xunxun:
If we can merge all the similar compiler warnings or errors or infos regexp to your xml based compilers, it will be better, and it will be maintained more easily.
Navigation
[0] Message Index
[*] Previous page
Go to full version