diff options
author | Liang Qi <liang.qi@qt.io> | 2016-12-16 09:38:46 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-12-16 09:45:16 +0100 |
commit | 9bfe3ab71e5291445e66be96d6cd1f63934a2d83 (patch) | |
tree | a3b5580d8788de658f39d5bdb23d84a447999bee /qmake | |
parent | 28dffdecdad4f3458b9aacec1a04803c7b5483a1 (diff) | |
parent | 179045f36a16ce2f6cfaad1dbd9443b52b1bf8d3 (diff) |
Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
doc/global/qt-cpp-defines.qdocconf
src/plugins/platforms/android/qandroidplatformopenglcontext.h
src/plugins/platforms/android/qandroidplatformtheme.h
Change-Id: I13d51cc66f708138ff4d667ceea7d515992e58a4
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 6 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 3 |
6 files changed, 24 insertions, 12 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index e3d76cd76e..8d5a9a7d0f 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -308,13 +308,13 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) { t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS"); + << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); if (project->first("TEMPLATE") == "aux") { t << "\n\n"; return; } - t << " $(DESTDIR_TARGET)\n\n"; - t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); + if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <<var("QMAKE_PRE_LINK"); if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") { diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 3a4f6242b2..da10b1984f 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -517,13 +517,12 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS"); + << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); if (templateName == "aux") { t << "\n\n"; return; } - t << " $(DESTDIR_TARGET)\n\n"; - t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <<var("QMAKE_PRE_LINK"); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 2d8d1fed0a..ac57a3379c 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2264,10 +2264,14 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) QString inFile = info.file; // is the extracompiler rule on a file with a built in compiler? - const QStringList &objectMappedFile = Project->extraCompilerOutputs[inFile]; + const QString objectMappedFile = Project->extraCompilerOutputs.value(inFile); bool hasBuiltIn = false; if (!objectMappedFile.isEmpty()) { - hasBuiltIn = Project->hasBuiltinCompiler(objectMappedFile.at(0)); + hasBuiltIn = Project->hasBuiltinCompiler(objectMappedFile); + + // Remove the fake file suffix we've added initially to generate correct command lines. + inFile.chop(Project->customBuildToolFilterFileSuffix.length()); + // qDebug("*** Extra compiler file has object mapped file '%s' => '%s'", qPrintable(inFile), qPrintable(objectMappedFile.join(' '))); } @@ -2309,7 +2313,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) // compiler, too bad.. if (hasBuiltIn) { out = inFile; - inFile = objectMappedFile.at(0); + inFile = objectMappedFile; } // Dependency for the output diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 018c70089d..8a77bbe672 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -204,7 +204,8 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos VcprojGenerator::VcprojGenerator() : Win32MakefileGenerator(), is64Bit(false), - projectWriter(0) + projectWriter(0), + customBuildToolFilterFileSuffix(QStringLiteral(".cbt")) { } @@ -892,10 +893,14 @@ void VcprojGenerator::init() if (!hasBuiltinCompiler(file)) { extraCompilerSources[file] += quc.toQString(); } else { + // Use a fake file name foo.moc.cbt for the project view. + // This prevents VS from complaining about a circular + // dependency from foo.moc -> foo.moc. QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables( compiler_out, file, QString(), NoShell), false); + out += customBuildToolFilterFileSuffix; extraCompilerSources[out] += quc.toQString(); - extraCompilerOutputs[out] = QStringList(file); // Can only have one + extraCompilerOutputs[out] = file; } } } diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 9ccd8c2552..e3e67d64b9 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -63,7 +63,8 @@ public: static bool hasBuiltinCompiler(const QString &file); QHash<QString, QStringList> extraCompilerSources; - QHash<QString, QStringList> extraCompilerOutputs; + QHash<QString, QString> extraCompilerOutputs; + const QString customBuildToolFilterFileSuffix; bool usePCH; VCProjectWriter *projectWriter; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 48df4ff916..3c029c8004 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -165,6 +165,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) void Win32MakefileGenerator::processVars() { + if (project->first("TEMPLATE").endsWith("aux")) + return; + project->values("QMAKE_ORIG_TARGET") = project->values("TARGET"); if (project->isEmpty("QMAKE_PROJECT_NAME")) project->values("QMAKE_PROJECT_NAME") = project->values("QMAKE_ORIG_TARGET"); |