diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 5502296dc..138342125 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -74,8 +74,7 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags( for (std::vector::const_iterator idi = includes.begin(); idi != includes.end(); ++idi) { std::string flg = modpath_flag; - flg += - this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL); + flg += this->ConvertToOutputFormat(*idi, cmOutputConverter::SHELL); this->AppendFlags(flags, flg); } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d8f6bdf94..20a1e21b3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1393,7 +1393,7 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, sp += lib.substr(pos); // Convert to an output path. - return this->Convert(sp.c_str(), NONE, format); + return this->ConvertToOutputFormat(sp.c_str(), format); } } } @@ -1489,7 +1489,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, for (std::vector::const_iterator fdi = fwDirs.begin(); fdi != fwDirs.end(); ++fdi) { frameworkPath += fwSearchFlag; - frameworkPath += this->Convert(*fdi, NONE, shellFormat); + frameworkPath += this->ConvertToOutputFormat(*fdi, shellFormat); frameworkPath += " "; } } @@ -1535,7 +1535,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, for (std::vector::iterator ri = runtimeDirs.begin(); ri != runtimeDirs.end(); ++ri) { rpath += cli.GetRuntimeFlag(); - rpath += this->Convert(*ri, NONE, shellFormat); + rpath += this->ConvertToOutputFormat(*ri, shellFormat); rpath += " "; } fout << rpath; @@ -1605,7 +1605,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, flags += " "; flags += sysrootFlag; flags += " "; - flags += this->Convert(sysroot, NONE, SHELL); + flags += this->ConvertToOutputFormat(sysroot, SHELL); } if (deploymentTargetFlag && *deploymentTargetFlag && deploymentTarget && diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 58c336de6..8c092e762 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -490,8 +490,8 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); } else { - output = this->Convert(outputs[0], cmOutputConverter::NONE, - cmOutputConverter::SHELL); + output = + this->ConvertToOutputFormat(outputs[0], cmOutputConverter::SHELL); } } vars.Output = output.c_str(); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 917d8d5ba..2e08417f0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -602,8 +602,7 @@ std::string cmLocalUnixMakefileGenerator3::MaybeConvertWatcomShellCommand( // lines with shell redirection operators. std::string scmd; if (cmSystemTools::GetShortPath(cmd, scmd)) { - return this->Convert(scmd, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + return this->ConvertToOutputFormat(scmd, cmOutputConverter::SHELL); } } return std::string(); @@ -790,8 +789,8 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom( std::string runRule = "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; runRule += " --check-build-system "; - runRule += this->Convert(cmakefileName, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + runRule += + this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL); runRule += " 0"; std::vector no_depends; @@ -995,8 +994,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( cmOutputConverter::SHELL); } else { - output = this->Convert(outputs[0], cmOutputConverter::NONE, - cmOutputConverter::SHELL); + output = this->ConvertToOutputFormat(outputs[0], + cmOutputConverter::SHELL); } } vars.Output = output.c_str(); @@ -1009,8 +1008,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string shellCommand = this->MaybeConvertWatcomShellCommand(cmd); if (shellCommand.empty()) { - shellCommand = this->Convert(cmd, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + shellCommand = + this->ConvertToOutputFormat(cmd, cmOutputConverter::SHELL); } cmd = launcher + shellCommand; @@ -1681,8 +1680,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( std::string runRule = "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; runRule += " --check-build-system "; - runRule += this->Convert(cmakefileName, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + runRule += + this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL); runRule += " 1"; commands.push_back(runRule); this->CreateCDCommand(commands, this->GetBinaryDirectory(), @@ -1895,8 +1894,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( // Call make on the given file. std::string cmd; cmd += "$(MAKE) -f "; - cmd += - this->Convert(makefile, cmOutputConverter::NONE, cmOutputConverter::SHELL); + cmd += this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL); cmd += " "; cmGlobalUnixMakefileGenerator3* gg = diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index ca006b707..d1cefe300 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -205,7 +205,7 @@ std::string cmLocalVisualStudioGenerator::ConstructScript( if (workingDirectory.empty()) { script += this->Convert(cmd.c_str(), START_OUTPUT, SHELL); } else { - script += this->Convert(cmd.c_str(), NONE, SHELL); + script += this->ConvertToOutputFormat(cmd.c_str(), SHELL); } ccg.AppendArguments(c, script); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 74bfedc52..a14df7949 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -135,8 +135,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetFullPathReal = outpath + targetNameReal; std::string targetFullPathPDB = pdbOutputPath + targetNamePDB; std::string targetFullPathImport = outpathImp + targetNameImport; - std::string targetOutPathPDB = this->Convert( - targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); + std::string targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( + targetFullPathPDB, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->Convert( targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); @@ -357,9 +357,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.Manifests = manifests.c_str(); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE")) { - std::string cmakeCommand = - this->Convert(cmSystemTools::GetCMakeCommand(), cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( + cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; cmakeCommand += targetOutPathReal; real_link_commands.push_back(cmakeCommand); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 6727bd050..c8ee05fbc 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -310,8 +310,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Construct the output path version of the names for use in command // arguments. - std::string targetOutPathPDB = this->Convert( - targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); + std::string targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( + targetFullPathPDB, cmOutputConverter::SHELL); std::string targetOutPath = this->Convert( targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); std::string targetOutPathSO = @@ -572,8 +572,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.TargetInstallNameDir = ""; } else { // Convert to a path for the native build tool. - install_name_dir = this->LocalGenerator->Convert( - install_name_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL); + install_name_dir = this->LocalGenerator->ConvertToOutputFormat( + install_name_dir, cmOutputConverter::SHELL); vars.TargetInstallNameDir = install_name_dir.c_str(); } } @@ -640,9 +640,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( cmSystemTools::ExpandListArgument(linkRule, real_link_commands); if (this->GeneratorTarget->GetProperty("LINK_WHAT_YOU_USE") && (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)) { - std::string cmakeCommand = - this->Convert(cmSystemTools::GetCMakeCommand(), - cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + std::string cmakeCommand = this->LocalGenerator->ConvertToOutputFormat( + cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); cmakeCommand += " -E __run_iwyu --lwyu="; cmakeCommand += targetOutPathReal; real_link_commands.push_back(cmakeCommand); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 5bba29cfa..7747aa7e9 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -324,11 +324,11 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( this->Generator->LocalGenerator->AppendEcho( commands, copyEcho, cmLocalUnixMakefileGenerator3::EchoBuild); std::string copyCommand = "$(CMAKE_COMMAND) -E copy "; - copyCommand += this->Generator->Convert(input, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + copyCommand += this->Generator->LocalGenerator->ConvertToOutputFormat( + input, cmOutputConverter::SHELL); copyCommand += " "; - copyCommand += this->Generator->Convert(output, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + copyCommand += this->Generator->LocalGenerator->ConvertToOutputFormat( + output, cmOutputConverter::SHELL); commands.push_back(copyCommand); this->Generator->LocalGenerator->WriteMakeRule( *this->Generator->BuildFileStream, CM_NULLPTR, output, depends, commands, @@ -464,8 +464,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } // Get the output paths for source and object files. - std::string sourceFile = this->Convert( - source.GetFullPath(), cmOutputConverter::NONE, cmOutputConverter::SHELL); + std::string sourceFile = this->LocalGenerator->ConvertToOutputFormat( + source.GetFullPath(), cmOutputConverter::SHELL); // Construct the build message. std::vector no_commands; @@ -516,8 +516,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( targetOutPathReal = this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); - targetOutPathPDB = this->Convert( - targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); + targetOutPathPDB = this->LocalGenerator->ConvertToOutputFormat( + targetFullPathPDB, cmOutputConverter::SHELL); targetOutPathCompilePDB = this->Convert(targetFullPathCompilePDB, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); @@ -539,7 +539,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); vars.Source = sourceFile.c_str(); std::string shellObj = - this->Convert(obj, cmOutputConverter::NONE, cmOutputConverter::SHELL); + this->LocalGenerator->ConvertToOutputFormat(obj, cmOutputConverter::SHELL); vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, @@ -699,8 +699,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::vector preprocessCommands; cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands); - std::string shellObjI = this->Convert(objI, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + std::string shellObjI = this->LocalGenerator->ConvertToOutputFormat( + objI, cmOutputConverter::SHELL); vars.PreprocessedSource = shellObjI.c_str(); // Expand placeholders in the commands. @@ -746,8 +746,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::vector assemblyCommands; cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands); - std::string shellObjS = this->Convert(objS, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + std::string shellObjS = this->LocalGenerator->ConvertToOutputFormat( + objS, cmOutputConverter::SHELL); vars.AssemblySource = shellObjS.c_str(); // Expand placeholders in the commands. @@ -1576,8 +1576,8 @@ void cmMakefileTargetGenerator::CreateLinkLibs( // Reference the response file. linkLibs = responseFlag; - linkLibs += this->Convert(link_rsp, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + linkLibs += this->LocalGenerator->ConvertToOutputFormat( + link_rsp, cmOutputConverter::SHELL); } } @@ -1625,8 +1625,8 @@ void cmMakefileTargetGenerator::CreateObjectLists( // Reference the response file. buildObjs += responseFlag; - buildObjs += this->Convert(objects_rsp, cmOutputConverter::NONE, - cmOutputConverter::SHELL); + buildObjs += this->LocalGenerator->ConvertToOutputFormat( + objects_rsp, cmOutputConverter::SHELL); } } else if (useLinkScript) { if (!useArchiveRules) { @@ -1683,8 +1683,8 @@ void cmMakefileTargetGenerator::GenDefFile( name_of_def_file += std::string("/") + this->GeneratorTarget->GetName(); name_of_def_file += ".def"; std::string cmd = cmSystemTools::GetCMakeCommand(); - cmd = - this->Convert(cmd, cmOutputConverter::NONE, cmOutputConverter::SHELL); + cmd = this->LocalGenerator->ConvertToOutputFormat( + cmd, cmOutputConverter::SHELL); cmd += " -E __create_def "; cmd += this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d0db1333e..335b5525e 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -543,8 +543,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() std::string install_dir = this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName); if (!install_dir.empty()) { - vars["INSTALLNAME_DIR"] = localGen.Convert( - install_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL); + vars["INSTALLNAME_DIR"] = localGen.ConvertToOutputFormat( + install_dir, cmOutputConverter::SHELL); } } }