Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMarc-Andre Laperle2015-11-12 15:56:55 +0000
committerGerrit Code Review @ Eclipse.org2015-11-26 14:01:33 +0000
commit5656acd2535c44197df6a6da9c430a1d8d8b62f6 (patch)
tree7e0a221b132219ec02f8c2e73135d9d998d53a39 /build
parent9e38beb5108964b6f3ef09a9e9dbd9b8e0c08aab (diff)
downloadorg.eclipse.cdt-5656acd2535c44197df6a6da9c430a1d8d8b62f6.tar.gz
org.eclipse.cdt-5656acd2535c44197df6a6da9c430a1d8d8b62f6.tar.xz
org.eclipse.cdt-5656acd2535c44197df6a6da9c430a1d8d8b62f6.zip
Bug 481971 - Detect cc compiler in the build output parser
Change-Id: If667583eb3f720aa9ad7907af4673da8437d15d7 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.autotools.core/plugin.xml2
-rw-r--r--build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/LibtoolGCCBuildCommandParserTest.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/language/settings/providers/tests/GCCBuildCommandParserTest.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/plugin.xml2
4 files changed, 14 insertions, 2 deletions
diff --git a/build/org.eclipse.cdt.autotools.core/plugin.xml b/build/org.eclipse.cdt.autotools.core/plugin.xml
index c5017002caf..261d653ee3c 100644
--- a/build/org.eclipse.cdt.autotools.core/plugin.xml
+++ b/build/org.eclipse.cdt.autotools.core/plugin.xml
@@ -573,7 +573,7 @@
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
id="org.eclipse.cdt.autotools.core.LibtoolGCCBuildCommandParser"
name="%LibtoolGCCBuildOutputParser.name"
- parameter="(libtool:\s+compile:\s+)?((gcc)|([gc]\+\+)|(clang))"
+ parameter="(libtool:\s+compile:\s+)?((g?cc)|([gc]\+\+)|(clang))"
prefer-non-shared="true">
</provider>
</extension>
diff --git a/build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/LibtoolGCCBuildCommandParserTest.java b/build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/LibtoolGCCBuildCommandParserTest.java
index 7263c52892c..686b8ea11ac 100644
--- a/build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/LibtoolGCCBuildCommandParserTest.java
+++ b/build/org.eclipse.cdt.autotools.tests/src/org/eclipse/cdt/autotools/tests/LibtoolGCCBuildCommandParserTest.java
@@ -61,6 +61,7 @@ public class LibtoolGCCBuildCommandParserTest extends BaseTestCase {
IFile file1=ResourceHelper.createFile(project, "file1.cpp");
IFile file2=ResourceHelper.createFile(project, "file2.cpp");
+ IFile file3=ResourceHelper.createFile(project, "file3.cpp");
@SuppressWarnings("deprecation")
ICLanguageSetting ls = cfgDescription.getLanguageSettingForFile(file1.getProjectRelativePath(), true);
String languageId = ls.getLanguageId();
@@ -72,6 +73,7 @@ public class LibtoolGCCBuildCommandParserTest extends BaseTestCase {
parser.startup(cfgDescription, null);
parser.processLine("libtool: compile: gcc -I/path0 file1.cpp");
parser.processLine("libtool: compile: g++ -I/path0 file2.cpp");
+ parser.processLine("libtool: compile: cc -I/path0 file3.cpp");
parser.shutdown();
{
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file1, languageId);
@@ -81,6 +83,10 @@ public class LibtoolGCCBuildCommandParserTest extends BaseTestCase {
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file2, languageId);
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
}
+ {
+ List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file3, languageId);
+ assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
+ }
}
} \ No newline at end of file
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 fa106fef2a6..2fd285291a9 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
@@ -447,6 +447,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
IFile file8=ResourceHelper.createFile(project, "file8.cpp");
IFile file9=ResourceHelper.createFile(project, "file9.cpp");
IFile file10=ResourceHelper.createFile(project, "file10.cpp");
+ IFile file11=ResourceHelper.createFile(project, "file11.cpp");
ICLanguageSetting ls = cfgDescription.getLanguageSettingForFile(file1.getProjectRelativePath(), true);
String languageId = ls.getLanguageId();
@@ -465,6 +466,7 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
parser.processLine("../relative/path/gcc -I/path0 file8.cpp");
parser.processLine("clang -I/path0 file9.cpp");
parser.processLine("clang++ -I/path0 file10.cpp");
+ parser.processLine("cc -I/path0 file11.cpp");
parser.shutdown();
// check populated entries
@@ -508,6 +510,10 @@ public class GCCBuildCommandParserTest extends BaseTestCase {
List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file10, languageId);
assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
}
+ {
+ List<ICLanguageSettingEntry> entries = parser.getSettingEntries(cfgDescription, file11, languageId);
+ assertEquals(new CIncludePathEntry("/path0", 0), entries.get(0));
+ }
}
/**
diff --git a/build/org.eclipse.cdt.managedbuilder.core/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml
index 4498dcd9498..b07b40c224a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.core/plugin.xml
@@ -639,7 +639,7 @@
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"
name="%GCCBuildOutputParser.name"
- parameter="(gcc)|([gc]\+\+)|(clang)"
+ parameter="(g?cc)|([gc]\+\+)|(clang)"
prefer-non-shared="true">
</provider>
</extension>

Back to the top