forked from qt-creator/qt-creator
CppTools: Do not return a language option for ProjectFile::Unclassified
This led to an invalid command line ("-x" without further argument). Change-Id: I8cfe1a8a29789fba426b61fe3702496d8089db6b Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -596,9 +596,10 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define
|
|||||||
static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt)
|
static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt)
|
||||||
{
|
{
|
||||||
QStringList opts;
|
QStringList opts;
|
||||||
opts += QLatin1String("-x");
|
|
||||||
|
|
||||||
switch (fileKind) {
|
switch (fileKind) {
|
||||||
|
case ProjectFile::Unclassified:
|
||||||
|
break;
|
||||||
case ProjectFile::CHeader:
|
case ProjectFile::CHeader:
|
||||||
if (objcExt)
|
if (objcExt)
|
||||||
opts += QLatin1String("objective-c-header");
|
opts += QLatin1String("objective-c-header");
|
||||||
@@ -643,6 +644,9 @@ static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objc
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!opts.isEmpty())
|
||||||
|
opts.prepend(QLatin1String("-x"));
|
||||||
|
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user