From d0cafe4cfbdeb20ee25355c293a98a9fe27e84d2 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Sat, 13 Jul 2013 09:28:21 -0400 Subject: [PATCH] bug 412897: CDT GCC build output parser does not understand -imacros --- .../providers/tests/GCCBuildCommandParserTest.java | 8 ++++---- .../settings/providers/GCCBuildCommandParser.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java index 70670e91f52..be837ea7d71 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java @@ -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(); diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java index 3aaa528d10a..b7153966a82 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java @@ -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"), };