From e44e6bcc045916fcab3b3798d9aa9951c35c1878 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 1 Jun 2015 20:07:26 +0200 Subject: Port away from obsolete method. --- Source/cmLocalVisualStudio6Generator.cxx | 72 ++++++++++++++++---------------- Source/cmLocalVisualStudio7Generator.cxx | 6 +-- 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index ad34857..e5f9f55 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -498,7 +498,7 @@ void cmLocalVisualStudio6Generator // Tell MS-Dev what the source is. If the compiler knows how to // build it, then it will. fout << "SOURCE=" << - this->ConvertToOptionallyRelativeOutputPath(source.c_str()) << "\n\n"; + this->ConvertToOutputFormat(source.c_str(), SHELL) << "\n\n"; if(!depends.empty()) { // Write out the dependencies for the rule. @@ -507,7 +507,7 @@ void cmLocalVisualStudio6Generator d != depends.end(); ++d) { fout << "\\\n\t" << - this->ConvertToOptionallyRelativeOutputPath(d->c_str()); + this->ConvertToOutputFormat(d->c_str(), SHELL); } fout << "\n"; } @@ -663,7 +663,7 @@ cmLocalVisualStudio6Generator if(this->GetRealDependency(d->c_str(), config.c_str(), dep)) { fout << "\\\n\t" << - this->ConvertToOptionallyRelativeOutputPath(dep.c_str()); + this->ConvertToOutputFormat(dep.c_str(), SHELL); } } fout << "\n"; @@ -689,7 +689,7 @@ cmLocalVisualStudio6Generator ++o) { // 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"; fout << script.c_str() << "\n\n"; } @@ -906,7 +906,7 @@ cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target, for(i = includes.begin(); i != includes.end(); ++i) { std::string tmp = - this->ConvertToOptionallyRelativeOutputPath(i->c_str()); + this->ConvertToOutputFormat(i->c_str(), SHELL); if(useShortPath) { cmSystemTools::GetShortPath(tmp.c_str(), tmp); @@ -997,14 +997,14 @@ void cmLocalVisualStudio6Generator if(libPath.size()) { std::string lpath = - this->ConvertToOptionallyRelativeOutputPath(libPath.c_str()); + this->ConvertToOutputFormat(libPath.c_str(), SHELL); if(lpath.size() == 0) { lpath = "."; } std::string lpathIntDir = libPath + "$(INTDIR)"; lpathIntDir = - this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); if(pathEmitted.insert(lpath).second) { libOptions += " /LIBPATH:"; @@ -1030,14 +1030,14 @@ void cmLocalVisualStudio6Generator if(exePath.size()) { std::string lpath = - this->ConvertToOptionallyRelativeOutputPath(exePath.c_str()); + this->ConvertToOutputFormat(exePath.c_str(), SHELL); if(lpath.size() == 0) { lpath = "."; } std::string lpathIntDir = exePath + "$(INTDIR)"; lpathIntDir = - this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); if(pathEmitted.insert(lpath).second) { @@ -1071,14 +1071,14 @@ void cmLocalVisualStudio6Generator path += "/"; } std::string lpath = - this->ConvertToOptionallyRelativeOutputPath(path.c_str()); + this->ConvertToOutputFormat(path.c_str(), SHELL); if(lpath.size() == 0) { lpath = "."; } std::string lpathIntDir = path + "$(INTDIR)"; lpathIntDir = - this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + this->ConvertToOutputFormat(lpathIntDir.c_str(), SHELL); if(pathEmitted.insert(lpath).second) { libOptions += " /LIBPATH:"; @@ -1142,9 +1142,9 @@ void cmLocalVisualStudio6Generator libDebug += ".lib"; } } - lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str()); + lib = this->ConvertToOutputFormat(lib.c_str(), SHELL); libDebug = - this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str()); + this->ConvertToOutputFormat(libDebug.c_str(), SHELL); if (j->second == cmTarget::GENERAL) { @@ -1367,21 +1367,21 @@ void cmLocalVisualStudio6Generator { #ifdef CM_USE_OLD_VS6 outputDirOld = - removeQuotes(this->ConvertToOptionallyRelativeOutputPath - (target.GetDirectory().c_str())); + removeQuotes(this->ConvertToOutputFormat + (target.GetDirectory().c_str(), SHELL)); #endif outputDirDebug = - removeQuotes(this->ConvertToOptionallyRelativeOutputPath( - target.GetDirectory("Debug").c_str())); + removeQuotes(this->ConvertToOutputFormat( + target.GetDirectory("Debug").c_str(), SHELL)); outputDirRelease = - removeQuotes(this->ConvertToOptionallyRelativeOutputPath( - target.GetDirectory("Release").c_str())); + removeQuotes(this->ConvertToOutputFormat( + target.GetDirectory("Release").c_str(), SHELL)); outputDirMinSizeRel = - removeQuotes(this->ConvertToOptionallyRelativeOutputPath( - target.GetDirectory("MinSizeRel").c_str())); + removeQuotes(this->ConvertToOutputFormat( + target.GetDirectory("MinSizeRel").c_str(), SHELL)); outputDirRelWithDebInfo = - removeQuotes(this->ConvertToOptionallyRelativeOutputPath( - target.GetDirectory("RelWithDebInfo").c_str())); + removeQuotes(this->ConvertToOutputFormat( + target.GetDirectory("RelWithDebInfo").c_str(), SHELL)); } else if(target.GetType() == cmTarget::OBJECT_LIBRARY) { @@ -1449,15 +1449,13 @@ void cmLocalVisualStudio6Generator targetImplibFlagMinSizeRel = "/implib:"; targetImplibFlagRelWithDebInfo = "/implib:"; targetImplibFlagDebug += - this->ConvertToOptionallyRelativeOutputPath(fullPathImpDebug.c_str()); + this->ConvertToOutputFormat(fullPathImpDebug.c_str(), SHELL); targetImplibFlagRelease += - this->ConvertToOptionallyRelativeOutputPath(fullPathImpRelease.c_str()); + this->ConvertToOutputFormat(fullPathImpRelease.c_str(), SHELL); targetImplibFlagMinSizeRel += - this->ConvertToOptionallyRelativeOutputPath( - fullPathImpMinSizeRel.c_str()); + this->ConvertToOutputFormat(fullPathImpMinSizeRel.c_str(), SHELL); targetImplibFlagRelWithDebInfo += - this->ConvertToOptionallyRelativeOutputPath( - fullPathImpRelWithDebInfo.c_str()); + this->ConvertToOutputFormat(fullPathImpRelWithDebInfo.c_str(), SHELL); } #ifdef CM_USE_OLD_VS6 @@ -1669,12 +1667,12 @@ void cmLocalVisualStudio6Generator // to convert to output path for unix to win32 conversion cmSystemTools::ReplaceString (line, "LIBRARY_OUTPUT_PATH", - removeQuotes(this->ConvertToOptionallyRelativeOutputPath - (libPath.c_str())).c_str()); + removeQuotes(this->ConvertToOutputFormat + (libPath.c_str(), SHELL)).c_str()); cmSystemTools::ReplaceString (line, "EXECUTABLE_OUTPUT_PATH", - removeQuotes(this->ConvertToOptionallyRelativeOutputPath - (exePath.c_str())).c_str()); + removeQuotes(this->ConvertToOutputFormat + (exePath.c_str(), SHELL)).c_str()); #endif if(targetBuilds || target.GetType() == cmTarget::OBJECT_LIBRARY) @@ -1884,9 +1882,9 @@ void cmLocalVisualStudio6Generator } dir += "$(IntDir)"; options += "# ADD LINK32 /LIBPATH:"; - options += this->ConvertToOptionallyRelativeOutputPath(dir.c_str()); + options += this->ConvertToOutputFormat(dir.c_str(), SHELL); options += " /LIBPATH:"; - options += this->ConvertToOptionallyRelativeOutputPath(d->c_str()); + options += this->ConvertToOutputFormat(d->c_str(), SHELL); options += "\n"; } } @@ -1897,7 +1895,7 @@ void cmLocalVisualStudio6Generator if(l->IsPath) { options += - this->ConvertToOptionallyRelativeOutputPath(l->Value.c_str()); + this->ConvertToOutputFormat(l->Value.c_str(), SHELL); } else if (!l->Target || l->Target->GetType() != cmTarget::INTERFACE_LIBRARY) @@ -1933,7 +1931,7 @@ void cmLocalVisualStudio6Generator options += "# ADD "; options += tool; options += "32 "; - options += this->ConvertToOptionallyRelativeOutputPath(oi->c_str()); + options += this->ConvertToOutputFormat(oi->c_str(), SHELL); options += "\n"; } } diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 9c031cf..c565632 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1087,7 +1087,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, if(!this->ModuleDefinitionFile.empty()) { std::string defFile = - this->ConvertToOptionallyRelativeOutputPath(this->ModuleDefinitionFile); + this->ConvertToOutputFormat(this->ModuleDefinitionFile, SHELL); linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } switch(target.GetType()) @@ -2234,7 +2234,7 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const std::string& s) std::string cmLocalVisualStudio7Generator ::ConvertToXMLOutputPath(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, "<", "<"); @@ -2245,7 +2245,7 @@ std::string cmLocalVisualStudio7Generator std::string cmLocalVisualStudio7Generator ::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, "<", "<"); -- cgit v0.12