mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 481971 - Detect cc compiler in the build output parser
Change-Id: If667583eb3f720aa9ad7907af4673da8437d15d7 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
parent
9e38beb510
commit
5656acd253
4 changed files with 14 additions and 2 deletions
|
@ -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>
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue