summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppprojects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppprojects.cpp')
-rw-r--r--src/plugins/cpptools/cppprojects.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppprojects.cpp b/src/plugins/cpptools/cppprojects.cpp
index e6ebee607c..ee5ae0156a 100644
--- a/src/plugins/cpptools/cppprojects.cpp
+++ b/src/plugins/cpptools/cppprojects.cpp
@@ -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;
}