Convert: Replace FULL conversions with equivalent

This commit is contained in:
Stephen Kelly 2016-08-27 13:44:55 +02:00
parent a8c7ccb183
commit 95a659f180
2 changed files with 7 additions and 11 deletions

View File

@ -1067,8 +1067,7 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
cleanfile += filename; cleanfile += filename;
} }
cleanfile += ".cmake"; cleanfile += ".cmake";
std::string cleanfilePath = std::string cleanfilePath = cmSystemTools::CollapseFullPath(cleanfile);
this->Convert(cleanfile, cmOutputConverter::FULL);
cmsys::ofstream fout(cleanfilePath.c_str()); cmsys::ofstream fout(cleanfilePath.c_str());
if (!fout) { if (!fout) {
cmSystemTools::Error("Could not create ", cleanfilePath.c_str()); cmSystemTools::Error("Could not create ", cleanfilePath.c_str());

View File

@ -393,9 +393,9 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
std::string objFullPath = this->LocalGenerator->GetCurrentBinaryDirectory(); std::string objFullPath = this->LocalGenerator->GetCurrentBinaryDirectory();
objFullPath += "/"; objFullPath += "/";
objFullPath += obj; objFullPath += obj;
objFullPath = this->Convert(objFullPath, cmOutputConverter::FULL); objFullPath = cmSystemTools::CollapseFullPath(objFullPath);
std::string srcFullPath = std::string srcFullPath =
this->Convert(source.GetFullPath(), cmOutputConverter::FULL); cmSystemTools::CollapseFullPath(source.GetFullPath());
this->LocalGenerator->AddImplicitDepends( this->LocalGenerator->AddImplicitDepends(
this->GeneratorTarget, lang, objFullPath.c_str(), srcFullPath.c_str()); this->GeneratorTarget, lang, objFullPath.c_str(), srcFullPath.c_str());
} }
@ -584,9 +584,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
lang_can_export_cmds && compileCommands.size() == 1) { lang_can_export_cmds && compileCommands.size() == 1) {
std::string compileCommand = compileCommands[0]; std::string compileCommand = compileCommands[0];
this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); this->LocalGenerator->ExpandRuleVariables(compileCommand, vars);
std::string workingDirectory = this->LocalGenerator->Convert( std::string workingDirectory = cmSystemTools::CollapseFullPath(
this->LocalGenerator->GetCurrentBinaryDirectory(), this->LocalGenerator->GetCurrentBinaryDirectory());
cmOutputConverter::FULL);
compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), compileCommand.replace(compileCommand.find(langFlags), langFlags.size(),
this->GetFlags(lang)); this->GetFlags(lang));
std::string langDefines = std::string("$(") + lang + "_DEFINES)"; std::string langDefines = std::string("$(") + lang + "_DEFINES)";
@ -1115,10 +1114,8 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile(
for (cmCustomCommand::ImplicitDependsList::const_iterator idi = for (cmCustomCommand::ImplicitDependsList::const_iterator idi =
ccg.GetCC().GetImplicitDepends().begin(); ccg.GetCC().GetImplicitDepends().begin();
idi != ccg.GetCC().GetImplicitDepends().end(); ++idi) { idi != ccg.GetCC().GetImplicitDepends().end(); ++idi) {
std::string objFullPath = std::string objFullPath = cmSystemTools::CollapseFullPath(outputs[0]);
this->Convert(outputs[0], cmOutputConverter::FULL); std::string srcFullPath = cmSystemTools::CollapseFullPath(idi->second);
std::string srcFullPath =
this->Convert(idi->second, cmOutputConverter::FULL);
this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, idi->first, this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, idi->first,
objFullPath.c_str(), objFullPath.c_str(),
srcFullPath.c_str()); srcFullPath.c_str());