Commit 284fdb2e authored by Daniel Teske's avatar Daniel Teske
Browse files

QMakeProjectManager: Support QMAKE_EXTRA_COMPILERS



Task-number: QTCREATORBUG-11212
Change-Id: I84358d6c2e9cb76eb72c8f85c6f7fedd2c4cfb0f
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 70cecb52
...@@ -640,7 +640,7 @@ void QmakePriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReade ...@@ -640,7 +640,7 @@ void QmakePriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReade
QFileInfo tmpFi; QFileInfo tmpFi;
for (int i = 0; i < fileTypes.size(); ++i) { for (int i = 0; i < fileTypes.size(); ++i) {
FileType type = fileTypes.at(i).type; FileType type = fileTypes.at(i).type;
QStringList qmakeVariables = varNames(type); QStringList qmakeVariables = varNames(type, readerExact);
QSet<Utils::FileName> newFilePaths; QSet<Utils::FileName> newFilePaths;
foreach (const QString &qmakeVariable, qmakeVariables) { foreach (const QString &qmakeVariable, qmakeVariables) {
...@@ -1238,7 +1238,7 @@ void QmakePriFileNode::save(const QStringList &lines) ...@@ -1238,7 +1238,7 @@ void QmakePriFileNode::save(const QStringList &lines)
errorStrings.join(QLatin1String("\n"))); errorStrings.join(QLatin1String("\n")));
} }
QStringList QmakePriFileNode::varNames(ProjectExplorer::FileType type) QStringList QmakePriFileNode::varNames(ProjectExplorer::FileType type, QtSupport::ProFileReader *readerExact)
{ {
QStringList vars; QStringList vars;
switch (type) { switch (type) {
...@@ -1247,12 +1247,18 @@ QStringList QmakePriFileNode::varNames(ProjectExplorer::FileType type) ...@@ -1247,12 +1247,18 @@ QStringList QmakePriFileNode::varNames(ProjectExplorer::FileType type)
vars << QLatin1String("OBJECTIVE_HEADERS"); vars << QLatin1String("OBJECTIVE_HEADERS");
vars << QLatin1String("PRECOMPILED_HEADER"); vars << QLatin1String("PRECOMPILED_HEADER");
break; break;
case ProjectExplorer::SourceType: case ProjectExplorer::SourceType: {
vars << QLatin1String("SOURCES"); vars << QLatin1String("SOURCES");
vars << QLatin1String("OBJECTIVE_SOURCES"); QStringList listOfExtraCompilers = readerExact->values(QLatin1String("QMAKE_EXTRA_COMPILERS"));
vars << QLatin1String("LEXSOURCES"); foreach (const QString &var, listOfExtraCompilers) {
vars << QLatin1String("YACCSOURCES"); QStringList inputs = readerExact->values(var + QLatin1String(".input"));
foreach (const QString &input, inputs)
// FORMS and RESOURCES are handled below
if (input != QLatin1String("FORMS") && input != QLatin1String("RESOURCES"))
vars << input;
}
break; break;
}
case ProjectExplorer::ResourceType: case ProjectExplorer::ResourceType:
vars << QLatin1String("RESOURCES"); vars << QLatin1String("RESOURCES");
break; break;
......
...@@ -177,7 +177,7 @@ public: ...@@ -177,7 +177,7 @@ public:
static QSet<Utils::FileName> recursiveEnumerate(const QString &folder); static QSet<Utils::FileName> recursiveEnumerate(const QString &folder);
protected: protected:
void setIncludedInExactParse(bool b); void setIncludedInExactParse(bool b);
static QStringList varNames(ProjectExplorer::FileType type); static QStringList varNames(ProjectExplorer::FileType type, QtSupport::ProFileReader *readerExact);
static QStringList varNamesForRemoving(); static QStringList varNamesForRemoving();
static QString varNameForAdding(const QString &mimeType); static QString varNameForAdding(const QString &mimeType);
static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, QtSupport::BaseQtVersion *qtVersion); static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, QtSupport::BaseQtVersion *qtVersion);
......
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