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:
parent
b1a9a7794f
commit
e824136a3b
@ -2213,8 +2213,8 @@ void VCFilter::addFiles(const ProStringList& fileList)
|
|||||||
|
|
||||||
void VCFilter::modifyPCHstage(QString str)
|
void VCFilter::modifyPCHstage(QString str)
|
||||||
{
|
{
|
||||||
bool autogenSourceFile = Project->autogenPrecompCPP;
|
bool autogenSourceFile = Project->autogenPrecompSource;
|
||||||
bool pchThroughSourceFile = !Project->precompCPP.isEmpty();
|
bool pchThroughSourceFile = !Project->precompSource.isEmpty();
|
||||||
bool isCFile = false;
|
bool isCFile = false;
|
||||||
for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
|
for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
|
||||||
if (str.endsWith(*it)) {
|
if (str.endsWith(*it)) {
|
||||||
@ -2223,7 +2223,7 @@ void VCFilter::modifyPCHstage(QString str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const bool isHFile = (str == Project->precompH);
|
const bool isHFile = (str == Project->precompH);
|
||||||
bool isCPPFile = pchThroughSourceFile && (str == Project->precompCPP);
|
bool isCPPFile = pchThroughSourceFile && (str == Project->precompSource);
|
||||||
|
|
||||||
if(!isCFile && !isHFile && !isCPPFile)
|
if(!isCFile && !isHFile && !isCPPFile)
|
||||||
return;
|
return;
|
||||||
@ -2231,7 +2231,7 @@ void VCFilter::modifyPCHstage(QString str)
|
|||||||
if(isHFile && pchThroughSourceFile) {
|
if(isHFile && pchThroughSourceFile) {
|
||||||
if (autogenSourceFile) {
|
if (autogenSourceFile) {
|
||||||
useCustomBuildTool = true;
|
useCustomBuildTool = true;
|
||||||
QString toFile(Project->precompCPP);
|
QString toFile(Project->precompSource);
|
||||||
CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
|
CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
|
||||||
CustomBuildTool.Outputs += toFile;
|
CustomBuildTool.Outputs += toFile;
|
||||||
|
|
||||||
|
@ -775,7 +775,7 @@ void VcprojGenerator::init()
|
|||||||
|
|
||||||
// Setup PCH variables
|
// Setup PCH variables
|
||||||
precompH = project->first("PRECOMPILED_HEADER").toQString();
|
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");
|
usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
|
||||||
if (usePCH) {
|
if (usePCH) {
|
||||||
precompHFilename = fileInfo(precompH).fileName();
|
precompHFilename = fileInfo(precompH).fileName();
|
||||||
@ -790,13 +790,13 @@ void VcprojGenerator::init()
|
|||||||
project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj);
|
project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj);
|
||||||
project->values("PRECOMPILED_PCH") = ProStringList(precompPch);
|
project->values("PRECOMPILED_PCH") = ProStringList(precompPch);
|
||||||
|
|
||||||
autogenPrecompCPP = precompCPP.isEmpty() && project->isActiveConfig("autogen_precompile_source");
|
autogenPrecompSource = precompSource.isEmpty() && project->isActiveConfig("autogen_precompile_source");
|
||||||
if (autogenPrecompCPP) {
|
if (autogenPrecompSource) {
|
||||||
precompCPP = precompH
|
precompSource = precompH
|
||||||
+ (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp"));
|
+ (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp"));
|
||||||
project->values("GENERATED_SOURCES") += precompCPP;
|
project->values("GENERATED_SOURCES") += precompSource;
|
||||||
} else if (!precompCPP.isEmpty()) {
|
} else if (!precompSource.isEmpty()) {
|
||||||
project->values("SOURCES") += precompCPP;
|
project->values("SOURCES") += precompSource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ public:
|
|||||||
~VcprojGenerator();
|
~VcprojGenerator();
|
||||||
|
|
||||||
QString defaultMakefile() const;
|
QString defaultMakefile() const;
|
||||||
QString precompH, precompHFilename, precompCPP,
|
QString precompH, precompHFilename, precompSource,
|
||||||
precompObj, precompPch;
|
precompObj, precompPch;
|
||||||
bool autogenPrecompCPP;
|
bool autogenPrecompSource;
|
||||||
static bool hasBuiltinCompiler(const QString &file);
|
static bool hasBuiltinCompiler(const QString &file);
|
||||||
|
|
||||||
QHash<QString, QStringList> extraCompilerSources;
|
QHash<QString, QStringList> extraCompilerSources;
|
||||||
|
Loading…
Reference in New Issue
Block a user