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 ...@@ -43,8 +43,8 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const
} }
std::string cmCommonTargetGenerator::Convert( std::string cmCommonTargetGenerator::Convert(
std::string const& source, cmLocalGenerator::RelativeRoot relative, std::string const& source, cmOutputConverter::RelativeRoot relative,
cmLocalGenerator::OutputFormat output) cmOutputConverter::OutputFormat output)
{ {
return this->LocalGenerator->Convert(source, relative, output); return this->LocalGenerator->Convert(source, relative, output);
} }
...@@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags) ...@@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
std::string mod_dir = this->GetFortranModuleDirectory(); std::string mod_dir = this->GetFortranModuleDirectory();
if (!mod_dir.empty()) { if (!mod_dir.empty()) {
mod_dir = mod_dir =
this->Convert(mod_dir, this->WorkingDirectory, cmLocalGenerator::SHELL); this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
} else { } else {
mod_dir = mod_dir =
this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT"); this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
...@@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags) ...@@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
idi != includes.end(); ++idi) { idi != includes.end(); ++idi) {
std::string flg = modpath_flag; std::string flg = modpath_flag;
flg += flg +=
this->Convert(*idi, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL);
this->LocalGenerator->AppendFlags(flags, flg); this->LocalGenerator->AppendFlags(flags, flg);
} }
} }
...@@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags( ...@@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
std::string& flags, cmSourceFile const& source) std::string& flags, cmSourceFile const& source)
{ {
const char* srcfmt = source.GetProperty("Fortran_FORMAT"); const char* srcfmt = source.GetProperty("Fortran_FORMAT");
cmLocalGenerator::FortranFormat format = cmOutputConverter::FortranFormat format =
this->LocalGenerator->GetFortranFormat(srcfmt); this->LocalGenerator->GetFortranFormat(srcfmt);
if (format == cmLocalGenerator::FortranFormatNone) { if (format == cmOutputConverter::FortranFormatNone) {
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT"); const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
format = this->LocalGenerator->GetFortranFormat(tgtfmt); format = this->LocalGenerator->GetFortranFormat(tgtfmt);
} }
const char* var = 0; const char* var = 0;
switch (format) { switch (format) {
case cmLocalGenerator::FortranFormatFixed: case cmOutputConverter::FortranFormatFixed:
var = "CMAKE_Fortran_FORMAT_FIXED_FLAG"; var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
break; break;
case cmLocalGenerator::FortranFormatFree: case cmOutputConverter::FortranFormatFree:
var = "CMAKE_Fortran_FORMAT_FREE_FLAG"; var = "CMAKE_Fortran_FORMAT_FREE_FLAG";
break; break;
default: default:
...@@ -244,7 +244,7 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l) ...@@ -244,7 +244,7 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
if (emitted.insert(*i).second) { if (emitted.insert(*i).second) {
flags += fwSearchFlag; flags += fwSearchFlag;
flags += this->LocalGenerator->ConvertToOutputFormat( flags += this->LocalGenerator->ConvertToOutputFormat(
*i, cmLocalGenerator::SHELL); *i, cmOutputConverter::SHELL);
flags += " "; flags += " ";
} }
} }
......
...@@ -65,8 +65,8 @@ protected: ...@@ -65,8 +65,8 @@ protected:
void AddFortranFlags(std::string& flags); void AddFortranFlags(std::string& flags);
std::string Convert( std::string Convert(
std::string const& source, cmLocalGenerator::RelativeRoot relative, std::string const& source, cmOutputConverter::RelativeRoot relative,
cmLocalGenerator::OutputFormat output = cmLocalGenerator::UNCHANGED); cmOutputConverter::OutputFormat output = cmOutputConverter::UNCHANGED);
void AppendFortranFormatFlags(std::string& flags, void AppendFortranFormatFlags(std::string& flags,
cmSourceFile const& source); cmSourceFile const& source);
......
...@@ -238,17 +238,17 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources, ...@@ -238,17 +238,17 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
// convert the dependencies to paths relative to the home output // convert the dependencies to paths relative to the home output
// directory. We must do the same here. // directory. We must do the same here.
std::string obj_i = 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( std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
obj_i, cmLocalGenerator::MAKERULE); obj_i, cmOutputConverter::MAKERULE);
internalDepends << obj_i << std::endl; internalDepends << obj_i << std::endl;
for (std::set<std::string>::const_iterator i = dependencies.begin(); for (std::set<std::string>::const_iterator i = dependencies.begin();
i != dependencies.end(); ++i) { i != dependencies.end(); ++i) {
makeDepends << obj_m << ": " makeDepends << obj_m << ": "
<< this->LocalGenerator->Convert(*i, << this->LocalGenerator->Convert(
cmLocalGenerator::HOME_OUTPUT, *i, cmOutputConverter::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmOutputConverter::MAKERULE)
<< std::endl; << std::endl;
internalDepends << " " << *i << std::endl; internalDepends << " " << *i << std::endl;
} }
......
...@@ -192,16 +192,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, ...@@ -192,16 +192,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
stamp += ".mod.stamp"; stamp += ".mod.stamp";
fcStream << "\n"; fcStream << "\n";
fcStream << " \"" fcStream << " \""
<< this->LocalGenerator->Convert(mod_lower, << this->LocalGenerator->Convert(
cmLocalGenerator::START_OUTPUT) mod_lower, cmOutputConverter::START_OUTPUT)
<< "\"\n"; << "\"\n";
fcStream << " \"" fcStream << " \""
<< this->LocalGenerator->Convert(mod_upper, << this->LocalGenerator->Convert(
cmLocalGenerator::START_OUTPUT) mod_upper, cmOutputConverter::START_OUTPUT)
<< "\"\n"; << "\"\n";
fcStream << " \"" fcStream << " \""
<< this->LocalGenerator->Convert(stamp, << this->LocalGenerator->Convert(
cmLocalGenerator::START_OUTPUT) stamp, cmOutputConverter::START_OUTPUT)
<< "\"\n"; << "\"\n";
} }
fcStream << " )\n"; fcStream << " )\n";
...@@ -317,17 +317,17 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -317,17 +317,17 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
// Write the include dependencies to the output stream. // Write the include dependencies to the output stream.
std::string obj_i = 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( std::string obj_m = this->LocalGenerator->ConvertToOutputFormat(
obj_i, cmLocalGenerator::MAKERULE); obj_i, cmOutputConverter::MAKERULE);
internalDepends << obj_i << std::endl; internalDepends << obj_i << std::endl;
internalDepends << " " << src << std::endl; internalDepends << " " << src << std::endl;
for (std::set<std::string>::const_iterator i = info.Includes.begin(); for (std::set<std::string>::const_iterator i = info.Includes.begin();
i != info.Includes.end(); ++i) { i != info.Includes.end(); ++i) {
makeDepends << obj_m << ": " makeDepends << obj_m << ": "
<< this->LocalGenerator->Convert(*i, << this->LocalGenerator->Convert(
cmLocalGenerator::HOME_OUTPUT, *i, cmOutputConverter::HOME_OUTPUT,
cmLocalGenerator::MAKERULE) cmOutputConverter::MAKERULE)
<< std::endl; << std::endl;
internalDepends << " " << *i << std::endl; internalDepends << " " << *i << std::endl;
} }
...@@ -354,7 +354,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -354,7 +354,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += *i; proxy += *i;
proxy += ".mod.proxy"; proxy += ".mod.proxy";
proxy = this->LocalGenerator->Convert( 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 // since we require some things add them to our list of requirements
makeDepends << obj_m << ".requires: " << proxy << std::endl; makeDepends << obj_m << ".requires: " << proxy << std::endl;
...@@ -370,8 +370,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -370,8 +370,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
if (!required->second.empty()) { if (!required->second.empty()) {
// This module is known. Depend on its timestamp file. // This module is known. Depend on its timestamp file.
std::string stampFile = this->LocalGenerator->Convert( std::string stampFile = this->LocalGenerator->Convert(
required->second, cmLocalGenerator::HOME_OUTPUT, required->second, cmOutputConverter::HOME_OUTPUT,
cmLocalGenerator::MAKERULE); cmOutputConverter::MAKERULE);
makeDepends << obj_m << ": " << stampFile << "\n"; makeDepends << obj_m << ": " << stampFile << "\n";
} else { } else {
// This module is not known to CMake. Try to locate it where // This module is not known to CMake. Try to locate it where
...@@ -379,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -379,7 +379,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
std::string module; std::string module;
if (this->FindModule(*i, module)) { if (this->FindModule(*i, module)) {
module = this->LocalGenerator->Convert( module = this->LocalGenerator->Convert(
module, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE); module, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << obj_m << ": " << module << "\n"; makeDepends << obj_m << ": " << module << "\n";
} }
} }
...@@ -392,8 +392,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -392,8 +392,8 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
proxy += "/"; proxy += "/";
proxy += *i; proxy += *i;
proxy += ".mod.proxy"; proxy += ".mod.proxy";
proxy = this->LocalGenerator->Convert(proxy, cmLocalGenerator::HOME_OUTPUT, proxy = this->LocalGenerator->Convert(
cmLocalGenerator::MAKERULE); proxy, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; makeDepends << proxy << ": " << obj_m << ".provides" << std::endl;
} }
...@@ -415,13 +415,13 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -415,13 +415,13 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
modFile += "/"; modFile += "/";
modFile += *i; modFile += *i;
modFile = this->LocalGenerator->Convert( modFile = this->LocalGenerator->Convert(
modFile, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::SHELL); modFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL);
std::string stampFile = stamp_dir; std::string stampFile = stamp_dir;
stampFile += "/"; stampFile += "/";
stampFile += m; stampFile += m;
stampFile += ".mod.stamp"; stampFile += ".mod.stamp";
stampFile = this->LocalGenerator->Convert( 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 makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile
<< " " << stampFile; << " " << stampFile;
cmMakefile* mf = this->LocalGenerator->GetMakefile(); cmMakefile* mf = this->LocalGenerator->GetMakefile();
...@@ -441,7 +441,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, ...@@ -441,7 +441,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj,
std::string driver = this->TargetDirectory; std::string driver = this->TargetDirectory;
driver += "/build"; driver += "/build";
driver = this->LocalGenerator->Convert( driver = this->LocalGenerator->Convert(
driver, cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKERULE); driver, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::MAKERULE);
makeDepends << driver << ": " << obj_m << ".provides.build\n"; makeDepends << driver << ": " << obj_m << ".provides.build\n";
} }
......
...@@ -902,7 +902,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const ...@@ -902,7 +902,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
const std::vector<cmGeneratorTarget*> targets = const std::vector<cmGeneratorTarget*> targets =
(*it)->GetGeneratorTargets(); (*it)->GetGeneratorTargets();
std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(), std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(),
cmLocalGenerator::HOME_OUTPUT); cmOutputConverter::HOME_OUTPUT);
if (subdir == ".") { if (subdir == ".") {
subdir = ""; subdir = "";
} }
......
...@@ -2523,7 +2523,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs, ...@@ -2523,7 +2523,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
// Shorten the output name (in expected use case). // Shorten the output name (in expected use case).
cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot()); cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
std::string fname = std::string fname =
converter.Convert(outputs[0], cmLocalGenerator::HOME_OUTPUT); converter.Convert(outputs[0], cmOutputConverter::HOME_OUTPUT);
// Associate the hash with this output. // Associate the hash with this output.
this->RuleHashes[fname] = hash; this->RuleHashes[fname] = hash;
......
...@@ -289,7 +289,7 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule() ...@@ -289,7 +289,7 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule()
std::ostringstream cmd; std::ostringstream cmd;
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(), cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
cmLocalGenerator::SHELL) cmOutputConverter::SHELL)
<< " -E copy $in $out"; << " -E copy $in $out";
this->AddRule("COPY_OSX_CONTENT", cmd.str(), "Copying OS X Content $out", this->AddRule("COPY_OSX_CONTENT", cmd.str(), "Copying OS X Content $out",
...@@ -1166,13 +1166,13 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) ...@@ -1166,13 +1166,13 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
std::ostringstream cmd; std::ostringstream cmd;
cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(), cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
cmLocalGenerator::SHELL) cmOutputConverter::SHELL)
<< " -H" << " -H"
<< lg->ConvertToOutputFormat(lg->GetSourceDirectory(), << lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
cmLocalGenerator::SHELL) cmOutputConverter::SHELL)
<< " -B" << " -B"
<< lg->ConvertToOutputFormat(lg->GetBinaryDirectory(), << lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
cmLocalGenerator::SHELL); cmOutputConverter::SHELL);
WriteRule(*this->RulesFileStream, "RERUN_CMAKE", cmd.str(), WriteRule(*this->RulesFileStream, "RERUN_CMAKE", cmd.str(),
"Re-running CMake...", "Rule for re-running cmake.", "Re-running CMake...", "Rule for re-running cmake.",
/*depfile=*/"", /*depfile=*/"",
...@@ -1221,7 +1221,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const ...@@ -1221,7 +1221,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const
cmLocalGenerator* lgen = this->LocalGenerators[0]; cmLocalGenerator* lgen = this->LocalGenerators[0];
if (lgen) { if (lgen) {
return lgen->ConvertToOutputFormat(this->NinjaCommand, return lgen->ConvertToOutputFormat(this->NinjaCommand,
cmLocalGenerator::SHELL); cmOutputConverter::SHELL);
} }
return "ninja"; return "ninja";
} }
......
...@@ -311,11 +311,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -311,11 +311,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream cmakefileStream
<< "# The top level Makefile was generated from the following files:\n" << "# The top level Makefile was generated from the following files:\n"
<< "set(CMAKE_MAKEFILE_DEPENDS\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(); for (std::vector<std::string>::const_iterator i = lfiles.begin();
i != lfiles.end(); ++i) { i != lfiles.end(); ++i) {
cmakefileStream << " \"" cmakefileStream << " \""
<< lg->Convert(*i, cmLocalGenerator::START_OUTPUT) << lg->Convert(*i, cmOutputConverter::START_OUTPUT)
<< "\"\n"; << "\"\n";
} }
cmakefileStream << " )\n\n"; cmakefileStream << " )\n\n";
...@@ -329,10 +329,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -329,10 +329,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
cmakefileStream << "# The corresponding makefile is:\n" cmakefileStream << "# The corresponding makefile is:\n"
<< "set(CMAKE_MAKEFILE_OUTPUTS\n" << "set(CMAKE_MAKEFILE_OUTPUTS\n"
<< " \"" << " \""
<< lg->Convert(makefileName, cmLocalGenerator::START_OUTPUT) << lg->Convert(makefileName, cmOutputConverter::START_OUTPUT)
<< "\"\n" << "\"\n"
<< " \"" << " \""
<< lg->Convert(check, cmLocalGenerator::START_OUTPUT) << lg->Convert(check, cmOutputConverter::START_OUTPUT)
<< "\"\n"; << "\"\n";
cmakefileStream << " )\n\n"; cmakefileStream << " )\n\n";
...@@ -345,7 +345,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -345,7 +345,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
for (std::vector<std::string>::const_iterator k = outfiles.begin(); for (std::vector<std::string>::const_iterator k = outfiles.begin();
k != outfiles.end(); ++k) { k != outfiles.end(); ++k) {
cmakefileStream << " \"" cmakefileStream << " \""
<< lg->Convert(*k, cmLocalGenerator::HOME_OUTPUT) << lg->Convert(*k, cmOutputConverter::HOME_OUTPUT)
<< "\"\n"; << "\"\n";
} }
...@@ -358,7 +358,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -358,7 +358,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
tmpStr += cmake::GetCMakeFilesDirectory(); tmpStr += cmake::GetCMakeFilesDirectory();
tmpStr += "/CMakeDirectoryInformation.cmake"; tmpStr += "/CMakeDirectoryInformation.cmake";
cmakefileStream << " \"" cmakefileStream << " \""
<< lg->Convert(tmpStr, cmLocalGenerator::HOME_OUTPUT) << lg->Convert(tmpStr, cmOutputConverter::HOME_OUTPUT)
<< "\"\n"; << "\"\n";
} }
cmakefileStream << " )\n\n"; cmakefileStream << " )\n\n";
...@@ -470,8 +470,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2( ...@@ -470,8 +470,8 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2(
// Begin the directory-level rules section. // Begin the directory-level rules section.
std::string dir = lg->GetCurrentBinaryDirectory(); std::string dir = lg->GetCurrentBinaryDirectory();
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT, dir = lg->Convert(dir, cmOutputConverter::HOME_OUTPUT,
cmLocalGenerator::MAKERULE); cmOutputConverter::MAKERULE);
lg->WriteDivider(ruleFileStream); lg->WriteDivider(ruleFileStream);
ruleFileStream << "# Directory level rules for directory " << dir << "\n\n"; ruleFileStream << "# Directory level rules for directory " << dir << "\n\n";
...@@ -716,8 +716,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( ...@@ -716,8 +716,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
std::ostringstream progCmd; std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
// # in target // # in target
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL, progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
cmLocalGenerator::SHELL); cmOutputConverter::SHELL);
// //
std::set<cmGeneratorTarget const*> emitted; std::set<cmGeneratorTarget const*> emitted;
progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted); progCmd << " " << this->CountProgressMarksInTarget(gtarget, emitted);
...@@ -729,8 +729,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( ...@@ -729,8 +729,8 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
{ {
std::ostringstream progCmd; std::ostringstream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
progCmd << lg->Convert(progress.Dir, cmLocalGenerator::FULL, progCmd << lg->Convert(progress.Dir, cmOutputConverter::FULL,
cmLocalGenerator::SHELL); cmOutputConverter::SHELL);
progCmd << " 0"; progCmd << " 0";
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
......
...@@ -385,7 +385,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( ...@@ -385,7 +385,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if (vcprojName) { if (vcprojName) {
cmLocalGenerator* lg = target->GetLocalGenerator(); cmLocalGenerator* lg = target->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory(); 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 == ".") { if (dir == ".") {
dir = ""; // msbuild cannot handle ".\" prefix dir = ""; // msbuild cannot handle ".\" prefix
} }
......
...@@ -660,10 +660,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( ...@@ -660,10 +660,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
std::string flags; std::string flags;
const char* srcfmt = sf->GetProperty("Fortran_FORMAT"); const char* srcfmt = sf->GetProperty("Fortran_FORMAT");
switch (this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) { switch (this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) {
case cmLocalGenerator::FortranFormatFixed: case cmOutputConverter::FortranFormatFixed:
flags = "-fixed " + flags; flags = "-fixed " + flags;
break; break;
case cmLocalGenerator::FortranFormatFree: case cmOutputConverter::FortranFormatFree:
flags = "-free " + flags; flags = "-free " + flags;
break; break;
default: default:
...@@ -1982,10 +1982,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, ...@@ -1982,10 +1982,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
const char* format = 0; const char* format = 0;
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT"); const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
switch (this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) { switch (this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) {
case cmLocalGenerator::FortranFormatFixed: case cmOutputConverter::FortranFormatFixed:
format = "fixed"; format = "fixed";
break; break;
case cmLocalGenerator::FortranFormatFree: case cmOutputConverter::FortranFormatFree:
format = "free"; format = "free";
break; break;
default: default:
......
...@@ -2140,7 +2140,7 @@ std::string cmLocalGenerator::ConstructComment( ...@@ -2140,7 +2140,7 @@ std::string cmLocalGenerator::ConstructComment(
for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin(); for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin();
o != ccg.GetOutputs().end(); ++o) { o != ccg.GetOutputs().end(); ++o) {
comment += sep; comment += sep;
comment += this->Convert(*o, cmLocalGenerator::START_OUTPUT); comment += this->Convert(*o, cmOutputConverter::START_OUTPUT);
sep = ", "; sep = ", ";
} }
return comment; return comment;
......
...@@ -174,9 +174,10 @@ public: ...@@ -174,9 +174,10 @@ public:
bool GetRealDependency(const std::string& name, const std::string& config, bool GetRealDependency(const std::string& name, const std::string& config,
std::string& dep); std::string& dep);
virtual std::string ConvertToIncludeReference(std::string const& path, virtual std::string ConvertToIncludeReference(
OutputFormat format = SHELL, std::string const& path,
bool forceFullPaths = false); cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
bool forceFullPaths = false);
/** Called from command-line hook to clear dependencies. */ /** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {} virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {}
...@@ -353,8 +354,9 @@ protected: ...@@ -353,8 +354,9 @@ protected:
std::string& CreateSafeUniqueObjectFileName(const std::string& sin, std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
std::string const& dir_max);