Commit 25d1ef64 authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by Brad King

Use enums defined in cmOutputConverter using their fully qualified name.

Mostly automated:

values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
        "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
        "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
parent c75d91a0
......@@ -43,8 +43,8 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const
}
std::string cmCommonTargetGenerator::Convert(
std::string const& source, cmLocalGenerator::RelativeRoot relative,
cmLocalGenerator::OutputFormat output)
std::string const& source, cmOutputConverter::RelativeRoot relative,
cmOutputConverter::OutputFormat output)
{
return this->LocalGenerator->Convert(source, relative, output);
}
......@@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
std::string mod_dir = this->GetFortranModuleDirectory();
if (!mod_dir.empty()) {
mod_dir =
this->Convert(mod_dir, this->WorkingDirectory, cmLocalGenerator::SHELL);
this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
} else {
mod_dir =
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
......@@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
idi != includes.end(); ++idi) {
std::string flg = modpath_flag;
flg +=
this->Convert(*idi, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL);
this->LocalGenerator->AppendFlags(flags, flg);
}
}
......@@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
std::string& flags, cmSourceFile const& source)
{
const char* srcfmt = source.GetProperty("Fortran_FORMAT");
cmLocalGenerator::FortranFormat format =
cmOutputConverter::FortranFormat format =
this->LocalGenerator->GetFortranFormat(srcfmt);
if (format == cmLocalGenerator::FortranFormatNone) {
if (format == cmOutputConverter::FortranFormatNone) {
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
format = this->LocalGenerator->GetFortranFormat(tgtfmt);
}
const char* var = 0;
switch (format) {
case cmLocalGenerator::FortranFormatFixed:
case cmOutputConverter::FortranFormatFixed:
var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
break;
case cmLocalGenerator::FortranFormatFree:
case cmOutputConverter::FortranFormatFree:
var = "CMAKE_Fortran_FORMAT_FREE_FLAG";
break;
default:
......@@ -244,7 +244,7 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
if (emitted.insert(*i).second) {
flags += fwSearchFlag;
flags += this->LocalGenerator->ConvertToOutputFormat(
*i, cmLocalGenerator::SHELL);
*i, cmOutputConverter::SHELL);
flags += " ";
}
}
......
......@@ -65,8 +65,8 @@ protected:
void AddFortranFlags(std::string& flags);
std::string Convert(
std::string const& source, cmLocalGenerator::RelativeRoot relative,
cmLocalGenerator::OutputFormat output = cmLocalGenerator::UNCHANGED);
std::string const& source, cmOutputConverter::RelativeRoot relative,
cmOutputConverter::OutputFormat output = cmOutputConverter::UNCHANGED);
void AppendFortranFormatFlags(std::string& flags,
cmSourceFile const& source);
......
......@@ -238,17 +238,17 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
// convert the dependencies to paths relative to the home output
// directory. We must do the same here.
std::string obj_i =
this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT);
this->LocalGenerator->Convert(obj, cmOutputConverter::HOME_OUTPUT);
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
obj_i, cmLocalGenerator::MAKERULE);
obj_i, cmOutputConverter::MAKERULE);
internalDepends << obj_i << std::endl;
for (std::set<std::string>::const_iterator i = dependencies.begin();
i != dependencies.end(); ++i) {
makeDepends << obj_m << ": "
<< this->LocalGenerator->Convert(*i,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)
<< this->LocalGenerator->Convert(
*i, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE)
<< std::endl;
internalDepends << " " << *i << std::endl;
}
......
......@@ -192,16 +192,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
stamp += ".mod.stamp";
fcStream << "\n";
fcStream << " \""
<< this->LocalGenerator->Convert(mod_lower,
cmLocalGenerator::START_OUTPUT)
<< this->LocalGenerator->Convert(
mod_lower, cmOutputConverter::START_OUTPUT)
<< "\"\n";
fcStream << " \""
<< this->LocalGenerator->Convert(mod_upper,
cmLocalGenerator::START_OUTPUT)
<< this->LocalGenerator->Convert(
mod_upper, cmOutputConverter::START_OUTPUT)
<< "\"\n";
fcStream << " \""
<< this->LocalGenerator->Convert(stamp,
cmLocalGenerator::START_OUTPUT)
<< this->LocalGenerator->Convert(
stamp, cmOutputConverter::START_OUTPUT)
<< "\"\n";
}
fcStream << " )\n";
......@@ -317,17 +317,17 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
// Write the include dependencies to the output stream.
std::string obj_i =
this->LocalGenerator->Convert(obj, cmLocalGenerator::HOME_OUTPUT);
this->LocalGenerator->Convert(obj, cmOutputConverter::HOME_OUTPUT);
std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
obj_i, cmLocalGenerator::MAKERULE);
obj_i, cmOutputConverter::MAKERULE);
internalDepends << obj_i << std::endl;
internalDepends << " " << src << std::endl;
for (std::set<std::string>::const_iterator i = info.Includes.begin();
i != info.Includes.end(); ++i) {
makeDepends << obj_m << ": "
<< this->LocalGenerator->Convert(*i,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)
<< this->LocalGenerator->Convert(
*i, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE)
<< std::endl;
internalDepends << " " << *i << std::endl;
}
......@@ -354,7 +354,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += *i;
proxy += ".mod.proxy";
proxy = this->LocalGenerator->Convert(
proxy, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
// since we require some things add them to our list of requirements
makeDepends << obj_m << ".requires: " << proxy << std::endl;
......@@ -370,8 +370,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
if (!required->second.empty()) {
// This module is known. Depend on its timestamp file.
std::string stampFile = this->LocalGenerator->Convert(
required->second, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE);
required->second, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE);
makeDepends << obj_m << ": " << stampFile << "\n";
} else {
// This module is not known to CMake. Try to locate it where
......@@ -379,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
std::string module;
if (this->FindModule(*i, module)) {
module = this->LocalGenerator->Convert(
module, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
module, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << obj_m << ": " << module << "\n";
}
}
......@@ -392,8 +392,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += "/";
proxy += *i;
proxy += ".mod.proxy";
proxy = this->LocalGenerator->Convert(proxy, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE);
proxy = this->LocalGenerator->Convert(
proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
}
......@@ -415,13 +415,13 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
modFile += "/";
modFile += *i;
modFile = this->LocalGenerator->Convert(
modFile, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::SHELL);
modFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL);
std::string stampFile = stamp_dir;
stampFile += "/";
stampFile += m;
stampFile += ".mod.stamp";
stampFile = this->LocalGenerator->Convert(
stampFile, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::SHELL);
stampFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL);
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
<< " " << stampFile;
cmMakefile* mf = this->LocalGenerator->GetMakefile();
......@@ -441,7 +441,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
std::string driver = this->TargetDirectory;
driver += "/build";
driver = this->LocalGenerator->Convert(
driver, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE);
driver, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << driver << ": " << obj_m << ".provides.build\n";
}
......
......@@ -902,7 +902,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
const std::vector<cmGeneratorTarget*> targets =
(*it)->GetGeneratorTargets();
std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT);
cmOutputConverter::HOME_OUTPUT);
if (subdir == ".") {
subdir = "";
}
......
......@@ -2523,7 +2523,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
// Shorten the output name (in expected use case).
cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
std::string fname =
converter.Convert(outputs[0], cmLocalGenerator::HOME_OUTPUT);
converter.Convert(outputs[0], cmOutputConverter::HOME_OUTPUT);
// Associate the hash with this output.
this->RuleHashes[fname] = hash;
......
......@@ -289,7 +289,7 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule()
std::ostringstream cmd;
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
cmLocalGenerator::SHELL)
cmOutputConverter::SHELL)
<< " -E copy $in $out";
this->AddRule("COPY_OSX_CONTENT", cmd.str(), "Copying OS X Content $out",
......@@ -1166,13 +1166,13 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
std::ostringstream cmd;
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
cmLocalGenerator::SHELL)
cmOutputConverter::SHELL)
<< " -H"
<< lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
cmLocalGenerator::SHELL)
cmOutputConverter::SHELL)
<< " -B"
<< lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
cmLocalGenerator::SHELL);
cmOutputConverter::SHELL);
WriteRule(*this->RulesFileStream, "RERUN_CMAKE", cmd.str(),
"Re-running CMake...", "Rule for re-running cmake.",
/*depfile=*/"",
......@@ -1221,7 +1221,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const
cmLocalGenerator* lgen = this->LocalGenerators[0];
if (lgen) {
return lgen->ConvertToOutputFormat(this->NinjaCommand,
cmLocalGenerator::SHELL);
cmOutputConverter::SHELL);
}
return "ninja";
}
......
......@@ -311,11 +311,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream
<< "# The top level Makefile was generated from the following files:\n"
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
<< " \"" << lg->Convert(cache, cmLocalGenerator::START_OUTPUT) << "\"\n";
<< " \"" << lg->Convert(cache, cmOutputConverter::START_OUTPUT) << "\"\n";
for (std::vector<std::string>::const_iterator i = lfiles.begin();
i != lfiles.end(); ++i) {
cmakefileStream << " \""
<< lg->Convert(*i, cmLocalGenerator::START_OUTPUT)
<< lg->Convert(*i, cmOutputConverter::START_OUTPUT)
<< "\"\n";
}
cmakefileStream << " )\n\n";
......@@ -329,10 +329,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream << "# The corresponding makefile is:\n"
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
<< " \""
<< lg->Convert(makefileName, cmLocalGenerator::START_OUTPUT)
<< lg->Convert(makefileName, cmOutputConverter::START_OUTPUT)
<< "\"\n"
<< " \""
<< lg->Convert(check, cmLocalGenerator::START_OUTPUT)
<< lg->Convert(check, cmOutputConverter::START_OUTPUT)
<< "\"\n";
cmakefileStream << " )\n\n";
......@@ -345,7 +345,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
for (std::vector<std::string>::const_iterator k = outfiles.begin();
k != outfiles.end(); ++k) {
cmakefileStream << " \""
<< lg->Convert(*k, cmLocalGenerator::HOME_OUTPUT)
<< lg->Convert(*k, cmOutputConverter::HOME_OUTPUT)
<< "\"\n";
}
......@@ -358,7 +358,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
tmpStr += cmake::GetCMakeFilesDirectory();
tmpStr += "/CMakeDirectoryInformation.cmake";
cmakefileStream << " \""
<< lg->Convert(tmpStr, cmLocalGenerator::HOME_OUTPUT)
<< lg->Convert(tmpStr, cmOutputConverter::HOME_OUTPUT)
<< "\"\n";
}
cmakefileStream << " )\n\n";
......@@ -470,8 +470,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2(
// Begin the directory-level rules section.
std::string dir = lg->GetCurrentBinaryDirectory();
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE);
dir = lg->Convert(dir, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE);
lg->WriteDivider(ruleFileStream);
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
......@@ -716,8 +716,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
// # in target
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
cmOutputConverter::SHELL);
//
std::set<cmGeneratorTarget const*> emitted;
progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted);
......@@ -729,8 +729,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
{
std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
cmOutputConverter::SHELL);
progCmd << " 0";
commands.push_back(progCmd.str());
}
......
......@@ -385,7 +385,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if (vcprojName) {
cmLocalGenerator* lg = target->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory();
dir = root->Convert(dir.c_str(), cmLocalGenerator::START_OUTPUT);
dir = root->Convert(dir.c_str(), cmOutputConverter::START_OUTPUT);
if (dir == ".") {
dir = ""; // msbuild cannot handle ".\" prefix
}
......
......@@ -660,10 +660,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
std::string flags;
const char* srcfmt = sf->GetProperty("Fortran_FORMAT");
switch (this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) {
case cmLocalGenerator::FortranFormatFixed:
case cmOutputConverter::FortranFormatFixed:
flags = "-fixed " + flags;
break;
case cmLocalGenerator::FortranFormatFree:
case cmOutputConverter::FortranFormatFree:
flags = "-free " + flags;
break;
default:
......@@ -1982,10 +1982,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
const char* format = 0;
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
switch (this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) {
case cmLocalGenerator::FortranFormatFixed:
case cmOutputConverter::FortranFormatFixed:
format = "fixed";
break;
case cmLocalGenerator::FortranFormatFree:
case cmOutputConverter::FortranFormatFree:
format = "free";
break;
default:
......
......@@ -2140,7 +2140,7 @@ std::string cmLocalGenerator::ConstructComment(
for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin();
o != ccg.GetOutputs().end(); ++o) {
comment += sep;
comment += this->Convert(*o, cmLocalGenerator::START_OUTPUT);
comment += this->Convert(*o, cmOutputConverter::START_OUTPUT);
sep = ", ";
}
return comment;
......
......@@ -174,9 +174,10 @@ public:
bool GetRealDependency(const std::string& name, const std::string& config,
std::string& dep);
virtual std::string ConvertToIncludeReference(std::string const& path,
OutputFormat format = SHELL,
bool forceFullPaths = false);
virtual std::string ConvertToIncludeReference(
std::string const& path,
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
bool forceFullPaths = false);
/** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {}
......@@ -353,8 +354,9 @@ protected:
std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
std::string const& dir_max);
virtual std::string ConvertToLinkReference(std::string const& lib,
OutputFormat format = SHELL);
virtual std::string ConvertToLinkReference(
std::string const& lib,
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL);
/** Check whether the native build system supports the given
definition. Issues a warning. */
......
......@@ -41,8 +41,8 @@ void cmLocalNinjaGenerator::Generate()
{
// Compute the path to use when referencing the current output
// directory from the top output directory.
this->HomeRelativeOutputPath =
this->Convert(this->GetCurrentBinaryDirectory(), HOME_OUTPUT);
this->HomeRelativeOutputPath = this->Convert(
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
if (this->HomeRelativeOutputPath == ".") {
this->HomeRelativeOutputPath = "";
}
......@@ -121,16 +121,19 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator()
// Virtual protected methods.
std::string cmLocalNinjaGenerator::ConvertToLinkReference(
std::string const& lib, OutputFormat format)
std::string const& lib, cmOutputConverter::OutputFormat format)
{
std::string path = this->GetGlobalNinjaGenerator()->ConvertToNinjaPath(lib);
return this->ConvertToOutputFormat(path, format);
}
std::string cmLocalNinjaGenerator::ConvertToIncludeReference(
std::string const& path, OutputFormat format, bool forceFullPaths)
std::string const& path, cmOutputConverter::OutputFormat format,
bool forceFullPaths)
{
return this->Convert(path, forceFullPaths ? FULL : HOME_OUTPUT, format);
return this->Convert(path, forceFullPaths ? cmOutputConverter::FULL
: cmOutputConverter::HOME_OUTPUT,
format);
}
// Private methods.
......@@ -338,7 +341,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(
#else
std::string cdStr = "cd ";
#endif
cdCmd << cdStr << this->ConvertToOutputFormat(wd, SHELL);
cdCmd << cdStr
<< this->ConvertToOutputFormat(wd, cmOutputConverter::SHELL);
cmdLines.push_back(cdCmd.str());
}
......@@ -346,7 +350,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(
for (unsigned i = 0; i != ccg.GetNumberOfCommands(); ++i) {
cmdLines.push_back(launcher +
this->ConvertToOutputFormat(ccg.GetCommand(i), SHELL));
this->ConvertToOutputFormat(ccg.GetCommand(i),
cmOutputConverter::SHELL));
std::string& cmd = cmdLines.back();
ccg.AppendArguments(i, cmd);
......@@ -473,10 +478,12 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
std::string output;
const std::vector<std::string>& outputs = ccg.GetOutputs();
if (!outputs.empty()) {
RelativeRoot relative_root =
ccg.GetWorkingDirectory().empty() ? START_OUTPUT : NONE;
cmOutputConverter::RelativeRoot relative_root =
ccg.GetWorkingDirectory().empty() ? cmOutputConverter::START_OUTPUT
: cmOutputConverter::NONE;
output = this->Convert(outputs[0], relative_root, SHELL);
output =
this->Convert(outputs[0], relative_root, cmOutputConverter::SHELL);
}
vars.Output = output.c_str();
......
......@@ -72,17 +72,19 @@ public:
void AppendCustomCommandDeps(cmCustomCommandGenerator const& ccg,
cmNinjaDeps& ninjaDeps);
virtual std::string ConvertToLinkReference(std::string const& lib,
OutputFormat format = SHELL);
virtual std::string ConvertToLinkReference(
std::string const& lib,
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL);
virtual void ComputeObjectFilenames(
std::map<cmSourceFile const*, std::string>& mapping,
cmGeneratorTarget const* gt = 0);
protected:
virtual std::string ConvertToIncludeReference(std::string const& path,
OutputFormat format = SHELL,
bool forceFullPaths = false);
virtual std::string ConvertToIncludeReference(
std::string const& path,
cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
bool forceFullPaths = false);
private:
cmGeneratedFileStream& GetBuildFileStream() const;
......
......@@ -140,8 +140,8 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath()
{
// Compute the path to use when referencing the current output
// directory from the top output directory.
this->HomeRelativeOutputPath =
this->Convert(this->GetCurrentBinaryDirectory(), HOME_OUTPUT);
this->HomeRelativeOutputPath = this->Convert(
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
if (this->HomeRelativeOutputPath == ".") {
this->HomeRelativeOutputPath = "";
}
......@@ -358,7 +358,7 @@ void cmLocalUnixMakefileGenerator3::WriteObjectConvenienceRule(
this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName));
}
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
cmLocalGenerator::START_OUTPUT);
cmOutputConverter::START_OUTPUT);
// Write the rule to the makefile.
std::vector<std::string> no_depends;
......@@ -398,7 +398,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
commands.push_back(
this->GetRecursiveMakeCall(makefile2.c_str(), localName));
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
cmLocalGenerator::START_OUTPUT);
cmOutputConverter::START_OUTPUT);
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
localName, depends, commands, true);
......@@ -423,7 +423,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
commands.push_back(
this->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName));
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
cmLocalGenerator::START_OUTPUT);
cmOutputConverter::START_OUTPUT);
this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
localName, depends, commands, true);
......@@ -439,7 +439,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
commands.push_back(
this->GetRecursiveMakeCall(makefile2.c_str(), makeTargetName));
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
cmLocalGenerator::START_OUTPUT);
cmOutputConverter::START_OUTPUT);
this->WriteMakeRule(ruleFileStream,
"Manual pre-install relink rule for target.",
localName, depends, commands, true);
......@@ -546,7 +546,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
}
// Construct the left hand side of the rule.
std::string tgt = this->Convert(target, HOME_OUTPUT, MAKERULE);
std::string tgt = this->Convert(target, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE);
const char* space = "";
if (tgt.size() == 1) {
......@@ -573,7 +574,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
for (std::vector<std::string>::const_iterator dep = depends.begin();
dep != depends.end(); ++dep) {
replace = *dep;
replace = this->Convert(replace, HOME_OUTPUT, MAKERULE);
replace = this->Convert(replace, cmOutputConverter::HOME_OUTPUT,
cmOutputConverter::MAKERULE);
os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
}
}
......@@ -591,7 +593,7 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
}
std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
std::string const& cmd, RelativeRoot root)
std::string const& cmd, cmOutputConverter::RelativeRoot root)
{
if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) &&
cmd.find_first_of("( )") != cmd.npos) {
......@@ -600,10 +602,11 @@ std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
// lines with shell redirection operators.
std::string scmd;
if (cmSystemTools::GetShortPath(cmd, scmd)) {
return this->Convert(scmd, NONE, SHELL);
return this->Convert(scmd, cmOutputConverter::NONE,
cmOutputConverter::SHELL);
}
}
return this->Convert(cmd, root, SHELL);
return this->Convert(cmd, root, cmOutputConverter::SHELL);
}