diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-11 10:36:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-11 10:36:46 (GMT) |
commit | 86b43e8186055ea232ae94e708d3cd381fa179df (patch) | |
tree | 8e20492c61a3925248c18e98bb229821dbf9f246 /qmake | |
parent | 1a742a039802b32cfe2a92d8ef1a04c3a21a964f (diff) | |
parent | fab911a64a72d5b7f450f3f3616e38c96d601553 (diff) | |
download | Qt-86b43e8186055ea232ae94e708d3cd381fa179df.zip Qt-86b43e8186055ea232ae94e708d3cd381fa179df.tar.gz Qt-86b43e8186055ea232ae94e708d3cd381fa179df.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging:
fixup for 23e772584531278e3b2a6c735ff9db88f7ffd76e
qmake vc(x)proj generator: support x64 Qt builds
qmake: remove dead code from VcxprojGenerator
qmake nmake generator: pass MAKEFLAGS to sub-make calls
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefile.cpp | 28 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.h | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 22 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcxproj.cpp | 18 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcxproj.h | 10 |
8 files changed, 41 insertions, 51 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4f3b113..39761e7 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2376,6 +2376,14 @@ MakefileGenerator::writeSubDirs(QTextStream &t) qDeleteAll(targets); } +void MakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix, + const QString &makeArguments, const QString &callPostfix) +{ + t << callPrefix + << "$(MAKE)" << makeArguments + << callPostfix << endl; +} + void MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubTarget*> targets, int flags) { @@ -2499,9 +2507,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << " " << valList(subtarget->depends); if(project->isEmpty("QMAKE_NOFORCE")) t << " FORCE"; - t << out_directory_cdin - << "$(MAKE)" << makefilein - << out_directory_cdout << endl; + writeSubMakeCall(t, out_directory_cdin, makefilein, out_directory_cdout); } for(int suffix = 0; suffix < targetSuffixes.size(); ++suffix) { @@ -2521,9 +2527,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << " " << targets.at(target-1)->target << "-" << targetSuffixes.at(suffix) << "-ordered "; if(project->isEmpty("QMAKE_NOFORCE")) t << " FORCE"; - t << out_directory_cdin - << "$(MAKE)" << makefilein << " " << s - << out_directory_cdout << endl; + writeSubMakeCall(t, out_directory_cdin, makefilein + " " + s, out_directory_cdout); } t << subtarget->target << "-" << targetSuffixes.at(suffix) << ": " << mkfile; if(!subtarget->depends.isEmpty()) @@ -2531,9 +2535,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT "-"+targetSuffixes.at(suffix)); if(project->isEmpty("QMAKE_NOFORCE")) t << " FORCE"; - t << out_directory_cdin - << "$(MAKE)" << makefilein << " " << s - << out_directory_cdout << endl; + writeSubMakeCall(t, out_directory_cdin, makefilein + " " + s, out_directory_cdout); } } t << endl; @@ -2667,12 +2669,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT //write the commands if(!out_directory.isEmpty()) { - t << out_directory_cdin - << "$(MAKE)" << makefilein << " " << sub_targ - << out_directory_cdout << endl; + writeSubMakeCall(t, out_directory_cdin, makefilein + " " + sub_targ, + out_directory_cdout); } else { - t << "\n\t" - << "$(MAKE)" << makefilein << " " << sub_targ << endl; + writeSubMakeCall(t, "\n\t", makefilein + " " + sub_targ, QString()); } } } diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index e0ef52d..417370a 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -127,6 +127,8 @@ protected: SubTargetsNoFlags=0x00 }; QList<MakefileGenerator::SubTarget*> findSubDirsSubTargets() const; + virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin, + const QString &makeFileIn, const QString &outDirectory_cdout); void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags); //extra compiler interface diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 0565c53..52eaace 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -86,6 +86,15 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return false; } +void NmakeMakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix, + const QString &makeArguments, const QString &callPostfix) +{ + // Pass MAKEFLAGS as environment variable to sub-make calls. + // Unlike other make tools nmake doesn't do this automatically. + t << "\n\t@set MAKEFLAGS=$(MAKEFLAGS)"; + Win32MakefileGenerator::writeSubMakeCall(t, callPrefix, makeArguments, callPostfix); +} + QString NmakeMakefileGenerator::getPdbTarget() { return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb"); diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h index 8954655..689cc19 100644 --- a/qmake/generators/win32/msvc_nmake.h +++ b/qmake/generators/win32/msvc_nmake.h @@ -57,6 +57,8 @@ class NmakeMakefileGenerator : public Win32MakefileGenerator void init(); protected: + virtual void writeSubMakeCall(QTextStream &t, const QString &callPrefix, + const QString &makeArguments, const QString &callPostfix); virtual QString getPdbTarget(); virtual QString defaultInstall(const QString &t); virtual QStringList &findDependencies(const QString &file); diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 56f3bfd..5807787 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -208,6 +208,7 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos VcprojGenerator::VcprojGenerator() : Win32MakefileGenerator(), init_flag(false), + is64Bit(false), projectWriter(0) { } @@ -597,14 +598,16 @@ nextfile: } } t << _slnGlobalBeg; + + QString slnConf = _slnSolutionConf; if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) { - QString slnConfCE = _slnSolutionConf; - QString platform = QString("|") + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; - slnConfCE.replace(QString("|Win32"), platform); - t << slnConfCE; - } else { - t << _slnSolutionConf; + QString slnPlatform = QString("|") + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; + slnConf.replace(QString("|Win32"), slnPlatform); + } else if (is64Bit) { + slnConf.replace(QString("|Win32"), "|x64"); } + t << slnConf; + t << _slnProjDepBeg; // Restore previous after_user_var options @@ -621,7 +624,7 @@ nextfile: t << _slnProjDepEnd; t << _slnProjConfBeg; for(QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) { - QString platform = "Win32"; + QString platform = is64Bit ? "x64" : "Win32"; if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) platform = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(platform) << platform; @@ -661,6 +664,7 @@ void VcprojGenerator::init() if (init_flag) return; init_flag = true; + is64Bit = (project->first("QMAKE_TARGET.arch") == "x86_64"); projectWriter = createProjectWriter(); if(project->first("TEMPLATE") == "vcsubdirs") //too much work for subdirs @@ -831,7 +835,7 @@ void VcprojGenerator::initProject() vcProject.Keyword = project->first("VCPROJ_KEYWORD"); if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) { - vcProject.PlatformName = (vcProject.Configuration.idl.TargetEnvironment == midlTargetWin64 ? "Win64" : "Win32"); + vcProject.PlatformName = (is64Bit ? "x64" : "Win32"); } else { vcProject.PlatformName = project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; } @@ -895,7 +899,7 @@ void VcprojGenerator::initConfiguration() conf.Name = isDebug ? "Debug" : "Release"; conf.ConfigurationName = conf.Name; if (project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) { - conf.Name += (conf.idl.TargetEnvironment == midlTargetWin64 ? "|Win64" : "|Win32"); + conf.Name += (is64Bit ? "|x64" : "|Win32"); } else { conf.Name += "|" + project->values("CE_SDK").join(" ") + " (" + project->first("CE_ARCH") + ")"; } diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index afe8f9f..c7f5c1b 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -57,6 +57,7 @@ struct QUuid; class VcprojGenerator : public Win32MakefileGenerator { bool init_flag; + bool is64Bit; bool writeVcprojParts(QTextStream &); bool writeMakefile(QTextStream &); diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 1e7c4b7..5b75cfa 100644 --- a/qmake/generators/win32/msvc_vcxproj.cpp +++ b/qmake/generators/win32/msvc_vcxproj.cpp @@ -41,26 +41,9 @@ #include "msvc_vcxproj.h" #include "msbuild_objectmodel.h" -#include <qdir.h> -#include <qdiriterator.h> -#include <quuid.h> - - -QT_BEGIN_NAMESPACE -// Filter GUIDs (Do NOT change these!) ------------------------------ -const char _GUIDSourceFiles[] = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"; -const char _GUIDHeaderFiles[] = "{93995380-89BD-4b04-88EB-625FBE52EBFB}"; -const char _GUIDGeneratedFiles[] = "{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"; -const char _GUIDResourceFiles[] = "{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"; -const char _GUIDLexYaccFiles[] = "{E12AE0D2-192F-4d59-BD23-7D3FA58D3183}"; -const char _GUIDTranslationFiles[] = "{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}"; -const char _GUIDFormFiles[] = "{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"; -const char _GUIDExtraCompilerFiles[] = "{E0D8C965-CC5F-43d7-AD63-FAEF0BBC0F85}"; -QT_END_NAMESPACE QT_BEGIN_NAMESPACE - VcxprojGenerator::VcxprojGenerator() : VcprojGenerator() { } @@ -71,4 +54,3 @@ VCProjectWriter *VcxprojGenerator::createProjectWriter() } QT_END_NAMESPACE - diff --git a/qmake/generators/win32/msvc_vcxproj.h b/qmake/generators/win32/msvc_vcxproj.h index 3283cc7..90f6652 100644 --- a/qmake/generators/win32/msvc_vcxproj.h +++ b/qmake/generators/win32/msvc_vcxproj.h @@ -42,8 +42,6 @@ #ifndef MSVC_VCXPROJ_H #define MSVC_VCXPROJ_H -#include "winmakefile.h" -#include "msbuild_objectmodel.h" #include "msvc_vcproj.h" QT_BEGIN_NAMESPACE @@ -52,19 +50,11 @@ class VcxprojGenerator : public VcprojGenerator { public: VcxprojGenerator(); - ~VcxprojGenerator(); protected: virtual VCProjectWriter *createProjectWriter(); - -private: - friend class VCFilter; - }; -inline VcxprojGenerator::~VcxprojGenerator() -{ } - QT_END_NAMESPACE #endif // MSVC_VCXPROJ_H |