mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-21 15:28:41 -05:00
Autogen: Log simplifications
This commit is contained in:
@@ -272,9 +272,7 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
|
|||||||
filename += "/AutogenInfo.cmake";
|
filename += "/AutogenInfo.cmake";
|
||||||
|
|
||||||
if (!makefile->ReadListFile(filename.c_str())) {
|
if (!makefile->ReadListFile(filename.c_str())) {
|
||||||
std::ostringstream err;
|
this->LogError("AutoGen: Error processing file: " + filename);
|
||||||
err << "AutoGen: error processing file: " << filename << std::endl;
|
|
||||||
this->LogError(err.str());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,10 +331,9 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
|
|||||||
cmSystemTools::ExpandListArgument(
|
cmSystemTools::ExpandListArgument(
|
||||||
makefile->GetSafeDefinition("AM_UIC_OPTIONS_OPTIONS"), uicOptionsVec);
|
makefile->GetSafeDefinition("AM_UIC_OPTIONS_OPTIONS"), uicOptionsVec);
|
||||||
if (uicFilesVec.size() != uicOptionsVec.size()) {
|
if (uicFilesVec.size() != uicOptionsVec.size()) {
|
||||||
std::ostringstream err;
|
this->LogError(
|
||||||
err << "AutoGen: Error: Uic files/options lists size missmatch in: "
|
"AutoGen: Error: Uic files/options lists size missmatch in: " +
|
||||||
<< filename << std::endl;
|
filename);
|
||||||
this->LogError(err.str());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (std::vector<std::string>::iterator fileIt = uicFilesVec.begin(),
|
for (std::vector<std::string>::iterator fileIt = uicFilesVec.begin(),
|
||||||
@@ -358,10 +355,9 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
|
|||||||
cmSystemTools::ExpandListArgument(
|
cmSystemTools::ExpandListArgument(
|
||||||
makefile->GetSafeDefinition("AM_RCC_OPTIONS_OPTIONS"), rccOptionsVec);
|
makefile->GetSafeDefinition("AM_RCC_OPTIONS_OPTIONS"), rccOptionsVec);
|
||||||
if (rccFilesVec.size() != rccOptionsVec.size()) {
|
if (rccFilesVec.size() != rccOptionsVec.size()) {
|
||||||
std::ostringstream err;
|
this->LogError(
|
||||||
err << "AutoGen: Error: RCC files/options lists size missmatch in: "
|
"AutoGen: Error: RCC files/options lists size missmatch in: " +
|
||||||
<< filename << std::endl;
|
filename);
|
||||||
this->LogError(err.str());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (std::vector<std::string>::iterator fileIt = rccFilesVec.begin(),
|
for (std::vector<std::string>::iterator fileIt = rccFilesVec.begin(),
|
||||||
@@ -381,10 +377,9 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
|
|||||||
rccInputLists.resize(this->RccSources.size());
|
rccInputLists.resize(this->RccSources.size());
|
||||||
}
|
}
|
||||||
if (this->RccSources.size() != rccInputLists.size()) {
|
if (this->RccSources.size() != rccInputLists.size()) {
|
||||||
std::ostringstream err;
|
this->LogError(
|
||||||
err << "AutoGen: Error: RCC sources/inputs lists size missmatch in: "
|
"AutoGen: Error: RCC sources/inputs lists size missmatch in: " +
|
||||||
<< filename << std::endl;
|
filename);
|
||||||
this->LogError(err.str());
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (std::vector<std::string>::iterator fileIt = this->RccSources.begin(),
|
for (std::vector<std::string>::iterator fileIt = this->RccSources.begin(),
|
||||||
@@ -480,12 +475,8 @@ bool cmQtAutoGenerators::SettingsFileWrite(const std::string& targetDirectory)
|
|||||||
success = false;
|
success = false;
|
||||||
// Remove old settings file to trigger full rebuild on next run
|
// Remove old settings file to trigger full rebuild on next run
|
||||||
cmSystemTools::RemoveFile(filename);
|
cmSystemTools::RemoveFile(filename);
|
||||||
{
|
this->LogError("AutoGen: Error: Writing old settings file failed: " +
|
||||||
std::ostringstream err;
|
filename);
|
||||||
err << "AutoGen: Error: Writing old settings file failed: "
|
|
||||||
<< filename;
|
|
||||||
this->LogError(err.str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
@@ -1150,13 +1141,13 @@ bool cmQtAutoGenerators::MocGenerateAll(
|
|||||||
outfile.open(this->MocCppFilenameAbs.c_str(), std::ios::trunc);
|
outfile.open(this->MocCppFilenameAbs.c_str(), std::ios::trunc);
|
||||||
if (!outfile) {
|
if (!outfile) {
|
||||||
success = false;
|
success = false;
|
||||||
this->LogError("AutoMoc: error opening " + this->MocCppFilenameAbs);
|
this->LogError("AutoMoc: Error opening " + this->MocCppFilenameAbs);
|
||||||
} else {
|
} else {
|
||||||
outfile << automocSource;
|
outfile << automocSource;
|
||||||
// Check for write errors
|
// Check for write errors
|
||||||
if (!outfile.good()) {
|
if (!outfile.good()) {
|
||||||
success = false;
|
success = false;
|
||||||
this->LogError("AutoMoc: error writing " + this->MocCppFilenameAbs);
|
this->LogError("AutoMoc: Error writing " + this->MocCppFilenameAbs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1768,7 +1759,7 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename) const
|
|||||||
if (!dirName.empty()) {
|
if (!dirName.empty()) {
|
||||||
success = cmsys::SystemTools::MakeDirectory(dirName);
|
success = cmsys::SystemTools::MakeDirectory(dirName);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
this->LogError("AutoGen: Directory creation failed: " + dirName);
|
this->LogError("AutoGen: Error: Directory creation failed: " + dirName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
|
|||||||
Reference in New Issue
Block a user