Commit 65137313 authored by Nikolai Kosjar's avatar Nikolai Kosjar

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: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
parent c5c57dca
......@@ -596,9 +596,10 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define
static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objcExt)
{
QStringList opts;
opts += QLatin1String("-x");
switch (fileKind) {
case ProjectFile::Unclassified:
break;
case ProjectFile::CHeader:
if (objcExt)
opts += QLatin1String("objective-c-header");
......@@ -643,6 +644,9 @@ static QStringList createLanguageOptionGcc(ProjectFile::Kind fileKind, bool objc
break;
}
if (!opts.isEmpty())
opts.prepend(QLatin1String("-x"));
return opts;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment