Rename VcProjGenerator::[autogen]precompCPP to [autogen]precompSource

Those names are a better fit as we want to support C precompiled
headers in a subsequent commit.

Change-Id: Ie3f852da945b9b2cf0e363c81f1a4b3063f27372
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Joerg Bornemann 2018-11-22 09:26:09 +01:00
parent b1a9a7794f
commit e824136a3b
3 changed files with 13 additions and 13 deletions

View File

@ -2213,8 +2213,8 @@ void VCFilter::addFiles(const ProStringList& fileList)
void VCFilter::modifyPCHstage(QString str)
{
bool autogenSourceFile = Project->autogenPrecompCPP;
bool pchThroughSourceFile = !Project->precompCPP.isEmpty();
bool autogenSourceFile = Project->autogenPrecompSource;
bool pchThroughSourceFile = !Project->precompSource.isEmpty();
bool isCFile = false;
for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
if (str.endsWith(*it)) {
@ -2223,7 +2223,7 @@ void VCFilter::modifyPCHstage(QString str)
}
}
const bool isHFile = (str == Project->precompH);
bool isCPPFile = pchThroughSourceFile && (str == Project->precompCPP);
bool isCPPFile = pchThroughSourceFile && (str == Project->precompSource);
if(!isCFile && !isHFile && !isCPPFile)
return;
@ -2231,7 +2231,7 @@ void VCFilter::modifyPCHstage(QString str)
if(isHFile && pchThroughSourceFile) {
if (autogenSourceFile) {
useCustomBuildTool = true;
QString toFile(Project->precompCPP);
QString toFile(Project->precompSource);
CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
CustomBuildTool.Outputs += toFile;

View File

@ -775,7 +775,7 @@ void VcprojGenerator::init()
// Setup PCH variables
precompH = project->first("PRECOMPILED_HEADER").toQString();
precompCPP = project->first("PRECOMPILED_SOURCE").toQString();
precompSource = project->first("PRECOMPILED_SOURCE").toQString();
usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
if (usePCH) {
precompHFilename = fileInfo(precompH).fileName();
@ -790,13 +790,13 @@ void VcprojGenerator::init()
project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj);
project->values("PRECOMPILED_PCH") = ProStringList(precompPch);
autogenPrecompCPP = precompCPP.isEmpty() && project->isActiveConfig("autogen_precompile_source");
if (autogenPrecompCPP) {
precompCPP = precompH
autogenPrecompSource = precompSource.isEmpty() && project->isActiveConfig("autogen_precompile_source");
if (autogenPrecompSource) {
precompSource = precompH
+ (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp"));
project->values("GENERATED_SOURCES") += precompCPP;
} else if (!precompCPP.isEmpty()) {
project->values("SOURCES") += precompCPP;
project->values("GENERATED_SOURCES") += precompSource;
} else if (!precompSource.isEmpty()) {
project->values("SOURCES") += precompSource;
}
}

View File

@ -57,9 +57,9 @@ public:
~VcprojGenerator();
QString defaultMakefile() const;
QString precompH, precompHFilename, precompCPP,
QString precompH, precompHFilename, precompSource,
precompObj, precompPch;
bool autogenPrecompCPP;
bool autogenPrecompSource;
static bool hasBuiltinCompiler(const QString &file);
QHash<QString, QStringList> extraCompilerSources;