1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-05 16:15:25 +02:00

bug 412897: CDT GCC build output parser does not understand -imacros

This commit is contained in:
Andrew Gvozdev 2013-07-13 09:28:21 -04:00
parent 8186a337c3
commit d0cafe4cfb
2 changed files with 6 additions and 6 deletions

View file

@ -721,7 +721,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
}
/**
* Parse variations of -macros options.
* Parse variations of -imacros options.
*/
public void testCMacroFileEntry() throws Exception {
// Create model project and accompanied descriptions
@ -739,10 +739,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
// parse line
parser.startup(cfgDescription, null);
parser.processLine("gcc -macros macro.file file.cpp");
parser.processLine("gcc -imacros macro.file file.cpp");
parser.processLine("gcc "
+ " -macros /macro.file"
+ " -macros '/macro.file with spaces'"
+ " -imacros /macro.file"
+ " -imacros '/macro.file with spaces'"
+ " file.cpp");
parser.shutdown();

View file

@ -42,8 +42,8 @@ public class GCCBuildCommandParser extends AbstractBuildCommandParser implements
new MacroOptionParser("-D\\s*([^\\s=\"']*)=([\"'])(.*?)\\2", "$1", "$3"),
new MacroOptionParser("-D\\s*([^\\s=\"']*)(=([^\\s\"']*))?", "$1", "$3"),
new MacroOptionParser("-U\\s*([^\\s=\"']*)", "$1", ICSettingEntry.UNDEFINED),
new MacroFileOptionParser("-macros\\s*([\"'])(.*)\\1", "$2"),
new MacroFileOptionParser("-macros\\s*([^\\s\"']*)", "$1"),
new MacroFileOptionParser("-imacros\\s*([\"'])(.*)\\1", "$2"),
new MacroFileOptionParser("-imacros\\s*([^\\s\"']*)", "$1"),
new LibraryPathOptionParser("-L\\s*([\"'])(.*)\\1", "$2"),
new LibraryPathOptionParser("-L\\s*([^\\s\"']*)", "$1"),
new LibraryFileOptionParser("-l\\s*([^\\s\"']*)", "lib$1.a"), };