Port away from obsolete method.

This commit is contained in:
Stephen Kelly 2015-06-01 20:07:26 +02:00 committed by Brad King
parent 1335992c8f
commit e44e6bcc04
2 changed files with 38 additions and 40 deletions

View File

@ -498,7 +498,7 @@ void cmLocalVisualStudio6Generator
// Tell MS-Dev what the source is. If the compiler knows how to // Tell MS-Dev what the source is. If the compiler knows how to
// build it, then it will. // build it, then it will.
fout << "SOURCE=" << fout << "SOURCE=" <<
this->ConvertToOptionallyRelativeOutputPath(source.c_str()) << "\n\n"; this->ConvertToOutputFormat(source.c_str(), SHELL) << "\n\n";
if(!depends.empty()) if(!depends.empty())
{ {
// Write out the dependencies for the rule. // Write out the dependencies for the rule.
@ -507,7 +507,7 @@ void cmLocalVisualStudio6Generator
d != depends.end(); ++d) d != depends.end(); ++d)
{ {
fout << "\\\n\t" << fout << "\\\n\t" <<
this->ConvertToOptionallyRelativeOutputPath(d->c_str()); this->ConvertToOutputFormat(d->c_str(), SHELL);
} }
fout << "\n"; fout << "\n";
} }
@ -663,7 +663,7 @@ cmLocalVisualStudio6Generator
if(this->GetRealDependency(d->c_str(), config.c_str(), dep)) if(this->GetRealDependency(d->c_str(), config.c_str(), dep))
{ {
fout << "\\\n\t" << fout << "\\\n\t" <<
this->ConvertToOptionallyRelativeOutputPath(dep.c_str()); this->ConvertToOutputFormat(dep.c_str(), SHELL);
} }
} }
fout << "\n"; fout << "\n";
@ -689,7 +689,7 @@ cmLocalVisualStudio6Generator
++o) ++o)
{ {
// Write a rule for every output generated by this command. // Write a rule for every output generated by this command.
fout << this->ConvertToOptionallyRelativeOutputPath(o->c_str()) fout << this->ConvertToOutputFormat(o->c_str(), SHELL)
<< " : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; << " : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t";
fout << script.c_str() << "\n\n"; fout << script.c_str() << "\n\n";
} }
@ -906,7 +906,7 @@ cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target,
for(i = includes.begin(); i != includes.end(); ++i) for(i = includes.begin(); i != includes.end(); ++i)
{ {
std::string tmp = std::string tmp =
this->ConvertToOptionallyRelativeOutputPath(i->c_str()); this->ConvertToOutputFormat(i->c_str(), SHELL);
if(useShortPath) if(useShortPath)
{ {
cmSystemTools::GetShortPath(tmp.c_str(), tmp); cmSystemTools::GetShortPath(tmp.c_str(), tmp);
@ -997,14 +997,14 @@ void cmLocalVisualStudio6Generator
if(libPath.size()) if(libPath.size())
{ {
std::string lpath = std::string lpath =
this->ConvertToOptionallyRelativeOutputPath(libPath.c_str()); this->ConvertToOutputFormat(libPath.c_str(), SHELL);
if(lpath.size() == 0) if(lpath.size() == 0)
{ {
lpath = "."; lpath = ".";
} }
std::string lpathIntDir = libPath + "$(INTDIR)"; std::string lpathIntDir = libPath + "$(INTDIR)";
lpathIntDir = lpathIntDir =
this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL);
if(pathEmitted.insert(lpath).second) if(pathEmitted.insert(lpath).second)
{ {
libOptions += " /LIBPATH:"; libOptions += " /LIBPATH:";
@ -1030,14 +1030,14 @@ void cmLocalVisualStudio6Generator
if(exePath.size()) if(exePath.size())
{ {
std::string lpath = std::string lpath =
this->ConvertToOptionallyRelativeOutputPath(exePath.c_str()); this->ConvertToOutputFormat(exePath.c_str(), SHELL);
if(lpath.size() == 0) if(lpath.size() == 0)
{ {
lpath = "."; lpath = ".";
} }
std::string lpathIntDir = exePath + "$(INTDIR)"; std::string lpathIntDir = exePath + "$(INTDIR)";
lpathIntDir = lpathIntDir =
this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL);
if(pathEmitted.insert(lpath).second) if(pathEmitted.insert(lpath).second)
{ {
@ -1071,14 +1071,14 @@ void cmLocalVisualStudio6Generator
path += "/"; path += "/";
} }
std::string lpath = std::string lpath =
this->ConvertToOptionallyRelativeOutputPath(path.c_str()); this->ConvertToOutputFormat(path.c_str(), SHELL);
if(lpath.size() == 0) if(lpath.size() == 0)
{ {
lpath = "."; lpath = ".";
} }
std::string lpathIntDir = path + "$(INTDIR)"; std::string lpathIntDir = path + "$(INTDIR)";
lpathIntDir = lpathIntDir =
this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL);
if(pathEmitted.insert(lpath).second) if(pathEmitted.insert(lpath).second)
{ {
libOptions += " /LIBPATH:"; libOptions += " /LIBPATH:";
@ -1142,9 +1142,9 @@ void cmLocalVisualStudio6Generator
libDebug += ".lib"; libDebug += ".lib";
} }
} }
lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str()); lib = this->ConvertToOutputFormat(lib.c_str(), SHELL);
libDebug = libDebug =
this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str()); this->ConvertToOutputFormat(libDebug.c_str(), SHELL);
if (j->second == cmTarget::GENERAL) if (j->second == cmTarget::GENERAL)
{ {
@ -1367,21 +1367,21 @@ void cmLocalVisualStudio6Generator
{ {
#ifdef CM_USE_OLD_VS6 #ifdef CM_USE_OLD_VS6
outputDirOld = outputDirOld =
removeQuotes(this->ConvertToOptionallyRelativeOutputPath removeQuotes(this->ConvertToOutputFormat
(target.GetDirectory().c_str())); (target.GetDirectory().c_str(), SHELL));
#endif #endif
outputDirDebug = outputDirDebug =
removeQuotes(this->ConvertToOptionallyRelativeOutputPath( removeQuotes(this->ConvertToOutputFormat(
target.GetDirectory("Debug").c_str())); target.GetDirectory("Debug").c_str(), SHELL));
outputDirRelease = outputDirRelease =
removeQuotes(this->ConvertToOptionallyRelativeOutputPath( removeQuotes(this->ConvertToOutputFormat(
target.GetDirectory("Release").c_str())); target.GetDirectory("Release").c_str(), SHELL));
outputDirMinSizeRel = outputDirMinSizeRel =
removeQuotes(this->ConvertToOptionallyRelativeOutputPath( removeQuotes(this->ConvertToOutputFormat(
target.GetDirectory("MinSizeRel").c_str())); target.GetDirectory("MinSizeRel").c_str(), SHELL));
outputDirRelWithDebInfo = outputDirRelWithDebInfo =
removeQuotes(this->ConvertToOptionallyRelativeOutputPath( removeQuotes(this->ConvertToOutputFormat(
target.GetDirectory("RelWithDebInfo").c_str())); target.GetDirectory("RelWithDebInfo").c_str(), SHELL));
} }
else if(target.GetType() == cmTarget::OBJECT_LIBRARY) else if(target.GetType() == cmTarget::OBJECT_LIBRARY)
{ {
@ -1449,15 +1449,13 @@ void cmLocalVisualStudio6Generator
targetImplibFlagMinSizeRel = "/implib:"; targetImplibFlagMinSizeRel = "/implib:";
targetImplibFlagRelWithDebInfo = "/implib:"; targetImplibFlagRelWithDebInfo = "/implib:";
targetImplibFlagDebug += targetImplibFlagDebug +=
this->ConvertToOptionallyRelativeOutputPath(fullPathImpDebug.c_str()); this->ConvertToOutputFormat(fullPathImpDebug.c_str(), SHELL);
targetImplibFlagRelease += targetImplibFlagRelease +=
this->ConvertToOptionallyRelativeOutputPath(fullPathImpRelease.c_str()); this->ConvertToOutputFormat(fullPathImpRelease.c_str(), SHELL);
targetImplibFlagMinSizeRel += targetImplibFlagMinSizeRel +=
this->ConvertToOptionallyRelativeOutputPath( this->ConvertToOutputFormat(fullPathImpMinSizeRel.c_str(), SHELL);
fullPathImpMinSizeRel.c_str());
targetImplibFlagRelWithDebInfo += targetImplibFlagRelWithDebInfo +=
this->ConvertToOptionallyRelativeOutputPath( this->ConvertToOutputFormat(fullPathImpRelWithDebInfo.c_str(), SHELL);
fullPathImpRelWithDebInfo.c_str());
} }
#ifdef CM_USE_OLD_VS6 #ifdef CM_USE_OLD_VS6
@ -1669,12 +1667,12 @@ void cmLocalVisualStudio6Generator
// to convert to output path for unix to win32 conversion // to convert to output path for unix to win32 conversion
cmSystemTools::ReplaceString cmSystemTools::ReplaceString
(line, "LIBRARY_OUTPUT_PATH", (line, "LIBRARY_OUTPUT_PATH",
removeQuotes(this->ConvertToOptionallyRelativeOutputPath removeQuotes(this->ConvertToOutputFormat
(libPath.c_str())).c_str()); (libPath.c_str(), SHELL)).c_str());
cmSystemTools::ReplaceString cmSystemTools::ReplaceString
(line, "EXECUTABLE_OUTPUT_PATH", (line, "EXECUTABLE_OUTPUT_PATH",
removeQuotes(this->ConvertToOptionallyRelativeOutputPath removeQuotes(this->ConvertToOutputFormat
(exePath.c_str())).c_str()); (exePath.c_str(), SHELL)).c_str());
#endif #endif
if(targetBuilds || target.GetType() == cmTarget::OBJECT_LIBRARY) if(targetBuilds || target.GetType() == cmTarget::OBJECT_LIBRARY)
@ -1884,9 +1882,9 @@ void cmLocalVisualStudio6Generator
} }
dir += "$(IntDir)"; dir += "$(IntDir)";
options += "# ADD LINK32 /LIBPATH:"; options += "# ADD LINK32 /LIBPATH:";
options += this->ConvertToOptionallyRelativeOutputPath(dir.c_str()); options += this->ConvertToOutputFormat(dir.c_str(), SHELL);
options += " /LIBPATH:"; options += " /LIBPATH:";
options += this->ConvertToOptionallyRelativeOutputPath(d->c_str()); options += this->ConvertToOutputFormat(d->c_str(), SHELL);
options += "\n"; options += "\n";
} }
} }
@ -1897,7 +1895,7 @@ void cmLocalVisualStudio6Generator
if(l->IsPath) if(l->IsPath)
{ {
options += options +=
this->ConvertToOptionallyRelativeOutputPath(l->Value.c_str()); this->ConvertToOutputFormat(l->Value.c_str(), SHELL);
} }
else if (!l->Target else if (!l->Target
|| l->Target->GetType() != cmTarget::INTERFACE_LIBRARY) || l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
@ -1933,7 +1931,7 @@ void cmLocalVisualStudio6Generator
options += "# ADD "; options += "# ADD ";
options += tool; options += tool;
options += "32 "; options += "32 ";
options += this->ConvertToOptionallyRelativeOutputPath(oi->c_str()); options += this->ConvertToOutputFormat(oi->c_str(), SHELL);
options += "\n"; options += "\n";
} }
} }

View File

@ -1087,7 +1087,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
if(!this->ModuleDefinitionFile.empty()) if(!this->ModuleDefinitionFile.empty())
{ {
std::string defFile = std::string defFile =
this->ConvertToOptionallyRelativeOutputPath(this->ModuleDefinitionFile); this->ConvertToOutputFormat(this->ModuleDefinitionFile, SHELL);
linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str());
} }
switch(target.GetType()) switch(target.GetType())
@ -2234,7 +2234,7 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const std::string& s)
std::string cmLocalVisualStudio7Generator std::string cmLocalVisualStudio7Generator
::ConvertToXMLOutputPath(const char* path) ::ConvertToXMLOutputPath(const char* path)
{ {
std::string ret = this->ConvertToOptionallyRelativeOutputPath(path); std::string ret = this->ConvertToOutputFormat(path, SHELL);
cmSystemTools::ReplaceString(ret, "&", "&amp;"); cmSystemTools::ReplaceString(ret, "&", "&amp;");
cmSystemTools::ReplaceString(ret, "\"", "&quot;"); cmSystemTools::ReplaceString(ret, "\"", "&quot;");
cmSystemTools::ReplaceString(ret, "<", "&lt;"); cmSystemTools::ReplaceString(ret, "<", "&lt;");
@ -2245,7 +2245,7 @@ std::string cmLocalVisualStudio7Generator
std::string cmLocalVisualStudio7Generator std::string cmLocalVisualStudio7Generator
::ConvertToXMLOutputPathSingle(const char* path) ::ConvertToXMLOutputPathSingle(const char* path)
{ {
std::string ret = this->ConvertToOptionallyRelativeOutputPath(path); std::string ret = this->ConvertToOutputFormat(path, SHELL);
cmSystemTools::ReplaceString(ret, "\"", ""); cmSystemTools::ReplaceString(ret, "\"", "");
cmSystemTools::ReplaceString(ret, "&", "&amp;"); cmSystemTools::ReplaceString(ret, "&", "&amp;");
cmSystemTools::ReplaceString(ret, "<", "&lt;"); cmSystemTools::ReplaceString(ret, "<", "&lt;");