diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-20 08:20:47 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-20 08:20:47 +0200 |
commit | 73f880d3934650de18def4eee615162d47416674 (patch) | |
tree | 07acedd242b334aba49df57a2983c07224b6d385 /qmake | |
parent | 6234286925153279ca259cec04429fa584187b16 (diff) | |
parent | 0d9f43d534983411e37a9f3912de272a4a6ced64 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
qmake/generators/makefile.cpp
qmake/generators/makefile.h
Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 25 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 3 |
6 files changed, 34 insertions, 12 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 3495f97b2c..b178084690 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1144,6 +1144,26 @@ \snippet code/doc_src_qmake-manual.pro 27 + \target DEFINES_DEBUG + \section1 DEFINES_DEBUG + + Specifies preprocessor defines for the debug configuration. The values of + this variable get added to \l{DEFINES} before the project is loaded. This + variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs + to be modified. + + This variable was introduced in Qt 5.13.2. + + \target DEFINES_RELEASE + \section1 DEFINES_RELEASE + + Specifies preprocessor defines for the release configuration. The values of + this variable get added to \l{DEFINES} before the project is loaded. This + variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs + to be modified. + + This variable was introduced in Qt 5.13.2. + \target DEF_FILE \section1 DEF_FILE @@ -4796,6 +4816,11 @@ \li The dependencies for the output only get generated from the depends member and from nowhere else. \row + \li dep_existing_only + \li Every dependency that is a result of .depend_command is checked for + existence. Non-existing dependencies are ignored. + This value was introduced in Qt 5.13.2. + \row \li dep_lines \li The output from the .depend_command is interpreted to be one file per line. The default is to split on whitespace and is maintained diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 94e9259c68..c5868adf27 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1856,7 +1856,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom const QString &inpf, const QString &tmp_out, bool dep_lines, - QStringList *deps) + QStringList *deps, + bool existingDepsOnly) { char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell); @@ -1885,6 +1886,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom warn_msg(WarnDeprecated, ".depend_command for extra compiler %s" " prints paths relative to source directory", extraCompiler.toLatin1().constData()); + } else if (existingDepsOnly) { + file.clear(); } else { file = absFile; // fallback for generated resources } @@ -2013,6 +2016,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << Qt::endl; } + const bool existingDepsOnly = config.contains("dep_existing_only"); QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList(); if (config.indexOf("combine") != -1) { if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) { @@ -2029,7 +2033,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) inputs += Option::fixPathToTargetOS(inpf, false); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); } } for(int i = 0; i < inputs.size(); ) { @@ -2078,7 +2082,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); //use the depend system to find includes of these included files QStringList inc_deps; for(int i = 0; i < deps.size(); ++i) { diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 45250a6aa2..18c27a4385 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -86,7 +86,8 @@ protected: QString resolveDependency(const QDir &outDir, const QString &file); void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd, const QString &tmp_dep_cmd, const QString &inpf, - const QString &tmp_out, bool dep_lines, QStringList *deps); + const QString &tmp_out, bool dep_lines, QStringList *deps, + bool existingDepsOnly); void writeExtraCompilerTargets(QTextStream &t); void writeExtraCompilerVariables(QTextStream &t); bool writeDummyMakefile(QTextStream &t); diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 67b478ae28..2fb24201bd 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -272,10 +272,6 @@ void NmakeMakefileGenerator::init() if (project->isActiveConfig("debug")) { project->values("QMAKE_CLEAN").append(targetBase + ".ilk"); project->values("QMAKE_CLEAN").append(targetBase + ".idb"); - } else { - ProStringList &defines = project->values("DEFINES"); - if (!defines.contains("NDEBUG")) - defines.append("NDEBUG"); } if (project->values("QMAKE_APP_FLAG").isEmpty() && project->isActiveConfig("dll")) { diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 8129bd76be..5396eba72e 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2126,7 +2126,6 @@ VCResourceCompilerTool::VCResourceCompilerTool() ShowProgress(linkProgressNotSet), SuppressStartupBanner(unset) { - PreprocessorDefinitions = QStringList("NDEBUG"); } // VCDeploymentTool -------------------------------------------- diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index b74448ce94..e45beca459 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1050,9 +1050,6 @@ void VcprojGenerator::initConfiguration() initDeploymentTool(); initWinDeployQtTool(); initPreLinkEventTools(); - - if (!isDebug) - conf.compiler.PreprocessorDefinitions += "NDEBUG"; } void VcprojGenerator::initCompilerTool() |