From 25d1ef6424e0b06687739c91a646633ab9aaf861 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Thu, 19 May 2016 23:11:40 +0200 Subject: [PATCH] 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 --- Source/cmCommonTargetGenerator.cxx | 18 +-- Source/cmCommonTargetGenerator.h | 4 +- Source/cmDependsC.cxx | 10 +- Source/cmDependsFortran.cxx | 40 +++--- Source/cmExtraEclipseCDT4Generator.cxx | 2 +- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.cxx | 10 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 24 ++-- Source/cmGlobalVisualStudio7Generator.cxx | 2 +- Source/cmGlobalXCodeGenerator.cxx | 8 +- Source/cmLocalGenerator.cxx | 2 +- Source/cmLocalGenerator.h | 12 +- Source/cmLocalNinjaGenerator.cxx | 27 ++-- Source/cmLocalNinjaGenerator.h | 12 +- Source/cmLocalUnixMakefileGenerator3.cxx | 112 ++++++++++------- Source/cmLocalUnixMakefileGenerator3.h | 12 +- Source/cmLocalVisualStudio7Generator.cxx | 41 +++--- .../cmMakefileExecutableTargetGenerator.cxx | 55 ++++---- Source/cmMakefileLibraryTargetGenerator.cxx | 84 +++++++------ Source/cmMakefileTargetGenerator.cxx | 118 +++++++++--------- Source/cmMakefileUtilityTargetGenerator.cxx | 4 +- Source/cmNinjaNormalTargetGenerator.cxx | 22 ++-- Source/cmNinjaTargetGenerator.cxx | 12 +- Source/cmNinjaUtilityTargetGenerator.cxx | 4 +- Source/cmVisualStudio10TargetGenerator.cxx | 4 +- 25 files changed, 339 insertions(+), 302 deletions(-) diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 6b2d1e315..c630971ce 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -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 += " "; } } diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index c5d324f1d..c9645e701 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -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); diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 0a5c7fa6f..78bb1b276 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -238,17 +238,17 @@ bool cmDependsC::WriteDependencies(const std::set& 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::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; } diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index b8af17870..8aa358cb5 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -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::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"; } diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index a8f2e3f25..f1b2e3342 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -902,7 +902,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const const std::vector targets = (*it)->GetGeneratorTargets(); std::string subdir = (*it)->Convert((*it)->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); if (subdir == ".") { subdir = ""; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 3f4c22f60..ec8e77c68 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2523,7 +2523,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector& 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; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index d65b463de..44a750f52 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -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"; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 7b5ea137b..198546146 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -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::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::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 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()); } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index cfe5e498f..faee6ae58 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -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 } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index efc239e80..a937e9c2f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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: diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0ff13d9f6..a350f09ee 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2140,7 +2140,7 @@ std::string cmLocalGenerator::ConstructComment( for (std::vector::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; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 892ad4f30..5c603a6be 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -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. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c7e1a90f8..270e6d3f2 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -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& 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(); diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index afaa24cf6..98993604b 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -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& 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; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 88c6d61af..8d4955b59 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -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 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::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); } void cmLocalUnixMakefileGenerator3::WriteMakeVariables( @@ -639,13 +642,15 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( makefileStream << "# The CMake executable.\n" << "CMAKE_COMMAND = " - << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL) + << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), + cmOutputConverter::FULL) << "\n" << "\n"; makefileStream << "# The command to remove a file.\n" << "RM = " - << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), FULL) + << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(), + cmOutputConverter::FULL) << " -E remove -f\n" << "\n"; makefileStream @@ -655,13 +660,17 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables( makefileStream << "# The top-level source directory on which CMake was run.\n" << "CMAKE_SOURCE_DIR = " - << this->Convert(this->GetSourceDirectory(), FULL, SHELL) + << this->Convert(this->GetSourceDirectory(), + cmOutputConverter::FULL, + cmOutputConverter::SHELL) << "\n" << "\n"; makefileStream << "# The top-level build directory on which CMake was run.\n" << "CMAKE_BINARY_DIR = " - << this->Convert(this->GetBinaryDirectory(), FULL, SHELL) + << this->Convert(this->GetBinaryDirectory(), + cmOutputConverter::FULL, + cmOutputConverter::SHELL) << "\n" << "\n"; /* clang-format on */ @@ -775,7 +784,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, NONE, SHELL); + runRule += this->Convert(cmakefileName, cmOutputConverter::NONE, + cmOutputConverter::SHELL); runRule += " 0"; std::vector no_depends; @@ -783,7 +793,7 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom( commands.push_back(runRule); if (!this->IsRootMakefile()) { this->CreateCDCommand(commands, this->GetBinaryDirectory(), - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); } this->WriteMakeRule( makefileStream, "Special rule to run CMake to check the build system " @@ -819,7 +829,8 @@ std::string cmLocalUnixMakefileGenerator3::GetRelativeTargetDirectory( { std::string dir = this->HomeRelativeOutputPath; dir += this->GetTargetDirectory(target); - return this->Convert(dir, NONE, UNCHANGED); + return this->Convert(dir, cmOutputConverter::NONE, + cmOutputConverter::UNCHANGED); } void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags, @@ -889,7 +900,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomDepend( void cmLocalUnixMakefileGenerator3::AppendCustomCommands( std::vector& commands, const std::vector& ccs, - cmGeneratorTarget* target, cmLocalGenerator::RelativeRoot relative) + cmGeneratorTarget* target, cmOutputConverter::RelativeRoot relative) { for (std::vector::const_iterator i = ccs.begin(); i != ccs.end(); ++i) { @@ -901,7 +912,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommands( void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::vector& commands, cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target, bool echo_comment, - cmLocalGenerator::RelativeRoot relative, std::ostream* content) + cmOutputConverter::RelativeRoot relative, std::ostream* content) { // Optionally create a command to display the custom command's // comment text. This is used for pre-build, pre-link, and @@ -951,7 +962,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // working directory will be the start-output directory. bool had_slash = cmd.find("/") != cmd.npos; if (workingDir.empty()) { - cmd = this->Convert(cmd, START_OUTPUT); + cmd = this->Convert(cmd, cmOutputConverter::START_OUTPUT); } bool has_slash = cmd.find("/") != cmd.npos; if (had_slash && !has_slash) { @@ -961,8 +972,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( cmd = "./" + cmd; } std::string launcher = this->MakeLauncher( - ccg, target, workingDir.empty() ? START_OUTPUT : NONE); - cmd = launcher + this->ConvertShellCommand(cmd, NONE); + ccg, target, workingDir.empty() ? cmOutputConverter::START_OUTPUT + : cmOutputConverter::NONE); + cmd = launcher + this->ConvertShellCommand(cmd, cmOutputConverter::NONE); ccg.AppendArguments(c, cmd); if (content) { @@ -1007,7 +1019,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( std::string cmLocalUnixMakefileGenerator3::MakeLauncher( cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target, - RelativeRoot relative) + cmOutputConverter::RelativeRoot relative) { // Short-circuit if there is no launcher. const char* prop = "RULE_LAUNCH_CUSTOM"; @@ -1024,7 +1036,7 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher( std::string output; const std::vector& outputs = ccg.GetOutputs(); if (!outputs.empty()) { - output = this->Convert(outputs[0], relative, SHELL); + output = this->Convert(outputs[0], relative, cmOutputConverter::SHELL); } vars.Output = output.c_str(); @@ -1049,7 +1061,8 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( cleanfile += filename; } cleanfile += ".cmake"; - std::string cleanfilePath = this->Convert(cleanfile, FULL); + std::string cleanfilePath = + this->Convert(cleanfile, cmOutputConverter::FULL); cmsys::ofstream fout(cleanfilePath.c_str()); if (!fout) { cmSystemTools::Error("Could not create ", cleanfilePath.c_str()); @@ -1058,13 +1071,15 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand( fout << "file(REMOVE_RECURSE\n"; for (std::vector::const_iterator f = files.begin(); f != files.end(); ++f) { - std::string fc = this->Convert(*f, START_OUTPUT, UNCHANGED); + std::string fc = this->Convert(*f, cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n"; } fout << ")\n"; } std::string remove = "$(CMAKE_COMMAND) -P "; - remove += this->Convert(cleanfile, START_OUTPUT, SHELL); + remove += this->Convert(cleanfile, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); commands.push_back(remove); // For the main clean rule add per-language cleaning. @@ -1133,8 +1148,8 @@ void cmLocalUnixMakefileGenerator3::AppendEcho( cmd += color_name; if (progress) { cmd += "--progress-dir="; - cmd += this->Convert(progress->Dir, cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); + cmd += this->Convert(progress->Dir, cmOutputConverter::FULL, + cmOutputConverter::SHELL); cmd += " "; cmd += "--progress-num="; cmd += progress->Arg; @@ -1544,9 +1559,9 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( this->AppendCustomDepends(depends, gt->GetPreBuildCommands()); this->AppendCustomDepends(depends, gt->GetPostBuildCommands()); this->AppendCustomCommands(commands, gt->GetPreBuildCommands(), gt, - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); this->AppendCustomCommands(commands, gt->GetPostBuildCommands(), gt, - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); std::string targetName = gt->GetName(); this->WriteMakeRule(ruleFileStream, targetString.c_str(), targetName, depends, commands, true); @@ -1583,15 +1598,15 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( { std::ostringstream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; - progCmd << this->Convert(progressDir, cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); + progCmd << this->Convert(progressDir, cmOutputConverter::FULL, + cmOutputConverter::SHELL); std::string progressFile = cmake::GetCMakeFilesDirectory(); progressFile += "/progress.marks"; std::string progressFileNameFull = this->ConvertToFullPath(progressFile); progCmd << " " - << this->Convert(progressFileNameFull, cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); + << this->Convert(progressFileNameFull, cmOutputConverter::FULL, + cmOutputConverter::SHELL); commands.push_back(progCmd.str()); } std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash(); @@ -1599,12 +1614,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( commands.push_back( this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget)); this->CreateCDCommand(commands, this->GetBinaryDirectory(), - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); { std::ostringstream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 - progCmd << this->Convert(progressDir, cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); + progCmd << this->Convert(progressDir, cmOutputConverter::FULL, + cmOutputConverter::SHELL); progCmd << " 0"; commands.push_back(progCmd.str()); } @@ -1619,7 +1634,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( commands.push_back( this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget)); this->CreateCDCommand(commands, this->GetBinaryDirectory(), - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", depends, commands, true); commands.clear(); @@ -1645,7 +1660,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( commands.push_back( this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget)); this->CreateCDCommand(commands, this->GetBinaryDirectory(), - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.", "preinstall", depends, commands, true); depends.clear(); @@ -1660,12 +1675,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( std::string runRule = "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; runRule += " --check-build-system "; - runRule += this->Convert(cmakefileName, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + runRule += this->Convert(cmakefileName, cmOutputConverter::NONE, + cmOutputConverter::SHELL); runRule += " 1"; commands.push_back(runRule); this->CreateCDCommand(commands, this->GetBinaryDirectory(), - cmLocalGenerator::START_OUTPUT); + cmOutputConverter::START_OUTPUT); this->WriteMakeRule(ruleFileStream, "clear depends", "depend", depends, commands, true); } @@ -1832,7 +1847,7 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { cmakefileStream << " \"" - << this->Convert(*i, cmLocalGenerator::HOME_OUTPUT) + << this->Convert(*i, cmOutputConverter::HOME_OUTPUT) << "\"\n"; } cmakefileStream << " )\n"; @@ -1874,7 +1889,8 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( // Call make on the given file. std::string cmd; cmd += "$(MAKE) -f "; - cmd += this->Convert(makefile, NONE, SHELL); + cmd += + this->Convert(makefile, cmOutputConverter::NONE, cmOutputConverter::SHELL); cmd += " "; cmGlobalUnixMakefileGenerator3* gg = @@ -1896,7 +1912,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall( // Add the target. if (!tgt.empty()) { // The make target is always relative to the top of the build tree. - std::string tgt2 = this->Convert(tgt, HOME_OUTPUT); + std::string tgt2 = this->Convert(tgt, cmOutputConverter::HOME_OUTPUT); // The target may have been written with windows paths. cmSystemTools::ConvertToOutputSlashes(tgt2); @@ -2031,7 +2047,7 @@ void cmLocalUnixMakefileGenerator3::AddImplicitDepends( void cmLocalUnixMakefileGenerator3::CreateCDCommand( std::vector& commands, const char* tgtDir, - cmLocalGenerator::RelativeRoot relRetDir) + cmOutputConverter::RelativeRoot relRetDir) { const char* retDir = this->GetRelativeRootPath(relRetDir); diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 321edcb64..a65a1a1cf 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -120,7 +120,7 @@ public: // create a command that cds to the start dir then runs the commands void CreateCDCommand(std::vector& commands, const char* targetDir, - cmLocalGenerator::RelativeRoot returnDir); + cmOutputConverter::RelativeRoot returnDir); static std::string ConvertToQuotedOutputPath(const char* p, bool useWatcomQuote); @@ -230,11 +230,11 @@ protected: void AppendCustomCommands( std::vector& commands, const std::vector& ccs, cmGeneratorTarget* target, - cmLocalGenerator::RelativeRoot relative = cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::RelativeRoot relative = cmOutputConverter::HOME_OUTPUT); void AppendCustomCommand( std::vector& commands, cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target, bool echo_comment = false, - cmLocalGenerator::RelativeRoot relative = cmLocalGenerator::HOME_OUTPUT, + cmOutputConverter::RelativeRoot relative = cmOutputConverter::HOME_OUTPUT, std::ostream* content = 0); void AppendCleanCommand(std::vector& commands, const std::vector& files, @@ -247,9 +247,11 @@ protected: void CheckMultipleOutputs(bool verbose); private: - std::string ConvertShellCommand(std::string const& cmd, RelativeRoot root); + std::string ConvertShellCommand(std::string const& cmd, + cmOutputConverter::RelativeRoot root); std::string MakeLauncher(cmCustomCommandGenerator const& ccg, - cmGeneratorTarget* target, RelativeRoot relative); + cmGeneratorTarget* target, + cmOutputConverter::RelativeRoot relative); virtual void ComputeObjectFilenames( std::map& mapping, diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index ad386f759..6e7d7d2ea 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -269,7 +269,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() args += this->GetBinaryDirectory(); commandLine.push_back(args); commandLine.push_back("--check-stamp-file"); - std::string stampFilename = this->Convert(stampName.c_str(), FULL, SHELL); + std::string stampFilename = this->Convert( + stampName.c_str(), cmOutputConverter::FULL, cmOutputConverter::SHELL); commandLine.push_back(stampFilename.c_str()); std::vector const& listFiles = this->Makefile->GetListFiles(); @@ -277,8 +278,8 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() cmCustomCommandLines commandLines; commandLines.push_back(commandLine); const char* no_working_directory = 0; - std::string fullpathStampName = - this->Convert(stampName.c_str(), FULL, UNCHANGED); + std::string fullpathStampName = this->Convert( + stampName.c_str(), cmOutputConverter::FULL, cmOutputConverter::UNCHANGED); this->Makefile->AddCustomCommandToOutput( fullpathStampName.c_str(), listFiles, makefileIn.c_str(), commandLines, comment.c_str(), no_working_directory, true); @@ -683,10 +684,10 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( if (this->FortranProject) { switch (this->GetFortranFormat(target->GetProperty("Fortran_FORMAT"))) { - case FortranFormatFixed: + case cmOutputConverter::FortranFormatFixed: flags += " -fixed"; break; - case FortranFormatFree: + case cmOutputConverter::FortranFormatFree: flags += " -free"; break; default: @@ -786,8 +787,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( target->GetProperty("Fortran_MODULE_DIRECTORY"); std::string modDir; if (target_mod_dir) { - modDir = this->Convert(target_mod_dir, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED); + modDir = this->Convert(target_mod_dir, cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); } else { modDir = "."; } @@ -1006,8 +1007,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( linkOptions.Parse(extraLinkOptions.c_str()); if (!this->ModuleDefinitionFile.empty()) { - std::string defFile = - this->ConvertToOutputFormat(this->ModuleDefinitionFile, SHELL); + std::string defFile = this->ConvertToOutputFormat( + this->ModuleDefinitionFile, cmOutputConverter::SHELL); linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } @@ -1298,8 +1299,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries( for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) { if (l->IsPath) { std::string rel = - lg->Convert(l->Value.c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED); + lg->Convert(l->Value.c_str(), cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " "; } else if (!l->Target || l->Target->GetType() != cmState::INTERFACE_LIBRARY) { @@ -1319,8 +1320,8 @@ void cmLocalVisualStudio7GeneratorInternals::OutputObjects( const char* sep = isep ? isep : ""; for (std::vector::const_iterator oi = objs.begin(); oi != objs.end(); ++oi) { - std::string rel = lg->Convert(oi->c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED); + std::string rel = lg->Convert(oi->c_str(), cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); fout << sep << lg->ConvertToXMLOutputPath(rel.c_str()); sep = " "; } @@ -1343,7 +1344,9 @@ void cmLocalVisualStudio7Generator::OutputLibraryDirectories( // Switch to a relative path specification if it is shorter. if (cmSystemTools::FileIsFullPath(dir.c_str())) { - std::string rel = this->Convert(dir.c_str(), START_OUTPUT, UNCHANGED); + std::string rel = + this->Convert(dir.c_str(), cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); if (rel.size() < dir.size()) { dir = rel; } @@ -1472,11 +1475,11 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( } if (lg->FortranProject) { switch (lg->GetFortranFormat(sf.GetProperty("Fortran_FORMAT"))) { - case cmLocalGenerator::FortranFormatFixed: + case cmOutputConverter::FortranFormatFixed: fc.CompileFlags = "-fixed " + fc.CompileFlags; needfc = true; break; - case cmLocalGenerator::FortranFormatFree: + case cmOutputConverter::FortranFormatFree: fc.CompileFlags = "-free " + fc.CompileFlags; needfc = true; break; @@ -2042,7 +2045,8 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const std::string& s) std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath( const char* path) { - std::string ret = this->ConvertToOutputFormat(path, SHELL); + std::string ret = + this->ConvertToOutputFormat(path, cmOutputConverter::SHELL); cmSystemTools::ReplaceString(ret, "&", "&"); cmSystemTools::ReplaceString(ret, "\"", """); cmSystemTools::ReplaceString(ret, "<", "<"); @@ -2053,7 +2057,8 @@ std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPath( std::string cmLocalVisualStudio7Generator::ConvertToXMLOutputPathSingle( const char* path) { - std::string ret = this->ConvertToOutputFormat(path, SHELL); + std::string ret = + this->ConvertToOutputFormat(path, cmOutputConverter::SHELL); cmSystemTools::ReplaceString(ret, "\"", ""); cmSystemTools::ReplaceString(ret, "&", "&"); cmSystemTools::ReplaceString(ret, "<", "<"); diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 674bc2f6d..51231fc8e 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -128,16 +128,16 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetFullPathPDB = pdbOutputPath + targetNamePDB; std::string targetFullPathImport = outpathImp + targetNameImport; std::string targetOutPathPDB = this->Convert( - targetFullPathPDB, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = this->Convert( - targetFullPath, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); + targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); std::string targetOutPathReal = - this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); std::string targetOutPathImport = - this->Convert(targetFullPathImport, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); // Get the language to use for linking this executable. std::string linkLanguage = @@ -209,29 +209,30 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // may need to be cleaned. std::vector exeCleanFiles; exeCleanFiles.push_back(this->Convert(targetFullPath, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. exeCleanFiles.push_back(this->Convert((targetFullPath + ".manifest").c_str(), - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); #endif if (targetNameReal != targetName) { exeCleanFiles.push_back(this->Convert(targetFullPathReal, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } if (!targetNameImport.empty()) { exeCleanFiles.push_back(this->Convert(targetFullPathImport, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - exeCleanFiles.push_back(this->Convert( - implib, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); + exeCleanFiles.push_back(this->Convert(implib, + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } } @@ -239,8 +240,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) // cleaned. We do not want to delete the .pdb file just before // linking the target. this->CleanFiles.push_back(this->Convert(targetFullPathPDB, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); // Add the pre-build and pre-link rules building but not when relinking. if (!relink) { @@ -323,14 +324,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); - cmLocalGenerator::OutputFormat output = (useWatcomQuote) - ? cmLocalGenerator::WATCOMQUOTE - : cmLocalGenerator::SHELL; - std::string target = this->Convert(targetFullPathReal, - cmLocalGenerator::START_OUTPUT, output); + cmOutputConverter::OutputFormat output = (useWatcomQuote) + ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL; + std::string target = this->Convert( + targetFullPathReal, cmOutputConverter::START_OUTPUT, output); vars.Target = target.c_str(); vars.TargetPDB = targetOutPathPDB.c_str(); @@ -380,7 +381,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) } this->LocalGenerator->CreateCDCommand( commands1, this->Makefile->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), commands1.begin(), commands1.end()); commands1.clear(); @@ -393,7 +394,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) commands1.push_back(symlink); this->LocalGenerator->CreateCDCommand( commands1, this->Makefile->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), commands1.begin(), commands1.end()); commands1.clear(); } diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 25235eabc..7f5bc11ac 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -301,17 +301,18 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Construct the output path version of the names for use in command // arguments. std::string targetOutPathPDB = this->Convert( - targetFullPathPDB, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); std::string targetOutPath = this->Convert( - targetFullPath, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); - std::string targetOutPathSO = this->Convert( - targetFullPathSO, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::SHELL); + targetFullPath, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); + std::string targetOutPathSO = + this->Convert(targetFullPathSO, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); std::string targetOutPathReal = - this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); std::string targetOutPathImport = - this->Convert(targetFullPathImport, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathImport, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); this->NumberOfProgressActions++; if (!this->NoRuleMessages) { @@ -357,27 +358,28 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // Clean files associated with this library. std::vector libCleanFiles; libCleanFiles.push_back(this->Convert(targetFullPath, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); if (targetNameReal != targetName) { libCleanFiles.push_back(this->Convert(targetFullPathReal, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } if (targetNameSO != targetName && targetNameSO != targetNameReal) { libCleanFiles.push_back(this->Convert(targetFullPathSO, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } if (!targetNameImport.empty()) { libCleanFiles.push_back(this->Convert(targetFullPathImport, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); std::string implib; if (this->GeneratorTarget->GetImplibGNUtoMS(targetFullPathImport, implib)) { - libCleanFiles.push_back(this->Convert( - implib, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); + libCleanFiles.push_back(this->Convert(implib, + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } } @@ -385,16 +387,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( // cleaned. We do not want to delete the .pdb file just before // linking the target. this->CleanFiles.push_back(this->Convert(targetFullPathPDB, - cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); #ifdef _WIN32 // There may be a manifest file for this target. Add it to the // clean set just in case. if (this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY) { libCleanFiles.push_back(this->Convert( - (targetFullPath + ".manifest").c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED)); + (targetFullPath + ".manifest").c_str(), cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED)); } #endif @@ -406,7 +408,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( this->GeneratorTarget, "target"); this->LocalGenerator->CreateCDCommand( commands1, this->Makefile->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), commands1.begin(), commands1.end()); commands1.clear(); } @@ -525,16 +527,16 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( std::string("/") + this->GeneratorTarget->GetName(); name_of_def_file += ".def"; std::string cmd = cmSystemTools::GetCMakeCommand(); - cmd = - this->Convert(cmd, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + cmd = this->Convert(cmd, cmOutputConverter::NONE, + cmOutputConverter::SHELL); cmd += " -E __create_def "; - cmd += this->Convert(name_of_def_file, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + cmd += this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); cmd += " "; std::string objlist_file = name_of_def_file; objlist_file += ".objs"; - cmd += this->Convert(objlist_file, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + cmd += this->Convert(objlist_file, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); real_link_commands.push_back(cmd); // create a list of obj files for the -E __create_def to read cmGeneratedFileStream fout(objlist_file.c_str()); @@ -555,8 +557,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( linkFlags += this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); linkFlags += - this->Convert(name_of_def_file, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(name_of_def_file, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); linkFlags += " "; } } @@ -588,14 +590,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); - cmLocalGenerator::OutputFormat output = (useWatcomQuote) - ? cmLocalGenerator::WATCOMQUOTE - : cmLocalGenerator::SHELL; - std::string target = this->Convert(targetFullPathReal, - cmLocalGenerator::START_OUTPUT, output); + cmOutputConverter::OutputFormat output = (useWatcomQuote) + ? cmOutputConverter::WATCOMQUOTE + : cmOutputConverter::SHELL; + std::string target = this->Convert( + targetFullPathReal, cmOutputConverter::START_OUTPUT, output); vars.Target = target.c_str(); vars.LinkLibraries = linkLibs.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); @@ -620,7 +622,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } else { // Convert to a path for the native build tool. install_name_dir = this->LocalGenerator->Convert( - install_name_dir, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + install_name_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL); vars.TargetInstallNameDir = install_name_dir.c_str(); } } @@ -707,7 +709,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( } this->LocalGenerator->CreateCDCommand( commands1, this->Makefile->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), commands1.begin(), commands1.end()); commands1.clear(); @@ -724,7 +726,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( commands1.push_back(symlink); this->LocalGenerator->CreateCDCommand( commands1, this->Makefile->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), commands1.begin(), commands1.end()); commands1.clear(); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e4801406c..980a49dbe 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -162,7 +162,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() for (std::vector::const_iterator o = outputs.begin(); o != outputs.end(); ++o) { this->CleanFiles.push_back(this->Convert( - *o, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::UNCHANGED)); + *o, cmOutputConverter::START_OUTPUT, cmOutputConverter::UNCHANGED)); } } } @@ -203,8 +203,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() *this->BuildFileStream << "# Include any dependencies generated for this target.\n" << this->GlobalGenerator->IncludeDirective << " " << root - << this->Convert(dependFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKERULE) + << this->Convert(dependFileNameFull, cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::MAKERULE) << "\n\n"; if (!this->NoRuleMessages) { @@ -213,8 +213,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() << "# Include the progress variables for this target.\n" << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, - cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKERULE) + cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::MAKERULE) << "\n\n"; } @@ -244,8 +244,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules() *this->BuildFileStream << "# Include the compile flags for this target's objects.\n" << this->GlobalGenerator->IncludeDirective << " " << root - << this->Convert(this->FlagFileNameFull, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKERULE) + << this->Convert(this->FlagFileNameFull, cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::MAKERULE) << "\n\n"; } @@ -301,8 +301,8 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( output += "/"; output += cmSystemTools::GetFilenameName(input); this->Generator->CleanFiles.push_back( - this->Generator->Convert(output, cmLocalGenerator::START_OUTPUT)); - output = this->Generator->Convert(output, cmLocalGenerator::HOME_OUTPUT); + this->Generator->Convert(output, cmOutputConverter::START_OUTPUT)); + output = this->Generator->Convert(output, cmOutputConverter::HOME_OUTPUT); // Create a rule to copy the content into the bundle. std::vector depends; @@ -313,11 +313,11 @@ void cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()( this->Generator->LocalGenerator->AppendEcho( commands, copyEcho.c_str(), cmLocalUnixMakefileGenerator3::EchoBuild); std::string copyCommand = "$(CMAKE_COMMAND) -E copy "; - copyCommand += this->Generator->Convert(input, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + copyCommand += this->Generator->Convert(input, cmOutputConverter::NONE, + cmOutputConverter::SHELL); copyCommand += " "; - copyCommand += this->Generator->Convert(output, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + copyCommand += this->Generator->Convert(output, cmOutputConverter::NONE, + cmOutputConverter::SHELL); commands.push_back(copyCommand); this->Generator->LocalGenerator->WriteMakeRule( *this->Generator->BuildFileStream, 0, output, depends, commands, false); @@ -381,9 +381,9 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( std::string objFullPath = this->LocalGenerator->GetCurrentBinaryDirectory(); objFullPath += "/"; objFullPath += obj; - objFullPath = this->Convert(objFullPath, cmLocalGenerator::FULL); + objFullPath = this->Convert(objFullPath, cmOutputConverter::FULL); std::string srcFullPath = - this->Convert(source.GetFullPath(), cmLocalGenerator::FULL); + this->Convert(source.GetFullPath(), cmOutputConverter::FULL); this->LocalGenerator->AddImplicitDepends( this->GeneratorTarget, lang, objFullPath.c_str(), srcFullPath.c_str()); } @@ -453,7 +453,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Get the output paths for source and object files. std::string sourceFile = this->Convert( - source.GetFullPath(), cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + source.GetFullPath(), cmOutputConverter::NONE, cmOutputConverter::SHELL); // Construct the build message. std::vector no_commands; @@ -502,13 +502,13 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } targetOutPathReal = - this->Convert(targetFullPathReal, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); - targetOutPathPDB = this->Convert(targetFullPathPDB, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathReal, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); + targetOutPathPDB = this->Convert( + targetFullPathPDB, cmOutputConverter::NONE, cmOutputConverter::SHELL); targetOutPathCompilePDB = - this->Convert(targetFullPathCompilePDB, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + this->Convert(targetFullPathCompilePDB, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); if (this->LocalGenerator->IsMinGWMake() && cmHasLiteralSuffix(targetOutPathCompilePDB, "\\")) { @@ -527,15 +527,15 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); vars.Source = sourceFile.c_str(); std::string shellObj = - this->Convert(obj, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + this->Convert(obj, cmOutputConverter::NONE, cmOutputConverter::SHELL); vars.Object = shellObj.c_str(); std::string objectDir = this->GeneratorTarget->GetSupportDirectory(); - objectDir = this->Convert(objectDir, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + objectDir = this->Convert(objectDir, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); vars.ObjectDir = objectDir.c_str(); std::string objectFileDir = cmSystemTools::GetFilenamePath(obj); - objectFileDir = this->Convert(objectFileDir, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + objectFileDir = this->Convert(objectFileDir, cmOutputConverter::START_OUTPUT, + cmOutputConverter::SHELL); vars.ObjectFileDir = objectFileDir.c_str(); vars.Flags = flags.c_str(); @@ -574,7 +574,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( this->LocalGenerator->ExpandRuleVariables(compileCommand, vars); std::string workingDirectory = this->LocalGenerator->Convert( this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::FULL); + cmOutputConverter::FULL); compileCommand.replace(compileCommand.find(langFlags), langFlags.size(), this->GetFlags(lang)); std::string langDefines = std::string("$(") + lang + "_DEFINES)"; @@ -637,7 +637,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Change the command working directory to the local build tree. this->LocalGenerator->CreateCDCommand( compileCommands, this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), compileCommands.begin(), compileCommands.end()); } @@ -687,8 +687,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::vector preprocessCommands; cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands); - std::string shellObjI = - this->Convert(objI, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + std::string shellObjI = this->Convert(objI, cmOutputConverter::NONE, + cmOutputConverter::SHELL); vars.PreprocessedSource = shellObjI.c_str(); // Expand placeholders in the commands. @@ -700,7 +700,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( this->LocalGenerator->CreateCDCommand( preprocessCommands, this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), preprocessCommands.begin(), preprocessCommands.end()); } else { @@ -735,8 +735,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::vector assemblyCommands; cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands); - std::string shellObjS = - this->Convert(objS, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + std::string shellObjS = this->Convert(objS, cmOutputConverter::NONE, + cmOutputConverter::SHELL); vars.AssemblySource = shellObjS.c_str(); // Expand placeholders in the commands. @@ -747,7 +747,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( this->LocalGenerator->CreateCDCommand( assemblyCommands, this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); commands.insert(commands.end(), assemblyCommands.begin(), assemblyCommands.end()); } else { @@ -836,7 +836,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules() this->GeneratorTarget); this->LocalGenerator->CreateCDCommand( commands, this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter::HOME_OUTPUT); // Write the rule. this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, cleanTarget, @@ -879,8 +879,8 @@ bool cmMakefileTargetGenerator::WriteMakeRule( o != outputs.end(); ++o) { // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. - std::string const out = this->Convert(*o, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::SHELL); + std::string const out = this->Convert(*o, cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::SHELL); std::vector output_commands; bool o_symbolic = false; @@ -988,7 +988,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() // translation table for the dependency scanning process. depCmd << "cd " << (this->LocalGenerator->Convert( this->LocalGenerator->GetBinaryDirectory(), - cmLocalGenerator::FULL, cmLocalGenerator::SHELL)) + cmOutputConverter::FULL, cmOutputConverter::SHELL)) << " && "; #endif // Generate a call this signature: @@ -1003,19 +1003,19 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() depCmd << "$(CMAKE_COMMAND) -E cmake_depends \"" << this->GlobalGenerator->GetName() << "\" " << this->Convert(this->LocalGenerator->GetSourceDirectory(), - cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + cmOutputConverter::FULL, cmOutputConverter::SHELL) << " " << this->Convert(this->LocalGenerator->GetCurrentSourceDirectory(), - cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + cmOutputConverter::FULL, cmOutputConverter::SHELL) << " " << this->Convert(this->LocalGenerator->GetBinaryDirectory(), - cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + cmOutputConverter::FULL, cmOutputConverter::SHELL) << " " << this->Convert(this->LocalGenerator->GetCurrentBinaryDirectory(), - cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + cmOutputConverter::FULL, cmOutputConverter::SHELL) << " " - << this->Convert(this->InfoFileNameFull, cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); + << this->Convert(this->InfoFileNameFull, cmOutputConverter::FULL, + cmOutputConverter::SHELL); if (this->LocalGenerator->GetColorMakefile()) { depCmd << " --color=$(COLOR)"; } @@ -1081,8 +1081,8 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile( // Now append the actual user-specified commands. std::ostringstream content; this->LocalGenerator->AppendCustomCommand( - commands, ccg, this->GeneratorTarget, false, cmLocalGenerator::HOME_OUTPUT, - &content); + commands, ccg, this->GeneratorTarget, false, + cmOutputConverter::HOME_OUTPUT, &content); // Collect the dependencies. std::vector depends; @@ -1103,9 +1103,9 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile( ccg.GetCC().GetImplicitDepends().begin(); idi != ccg.GetCC().GetImplicitDepends().end(); ++idi) { std::string objFullPath = - this->Convert(outputs[0], cmLocalGenerator::FULL); + this->Convert(outputs[0], cmOutputConverter::FULL); std::string srcFullPath = - this->Convert(idi->second, cmLocalGenerator::FULL); + this->Convert(idi->second, cmOutputConverter::FULL); this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, idi->first, objFullPath.c_str(), srcFullPath.c_str()); @@ -1161,7 +1161,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::vector::const_iterator i = this->ExternalObjects.begin(); i != this->ExternalObjects.end(); ++i) { - object = this->Convert(*i, cmLocalGenerator::START_OUTPUT); + object = this->Convert(*i, cmOutputConverter::START_OUTPUT); *this->BuildFileStream << " " << lineContinue << "\n" << this->Makefile->GetSafeDefinition( "CMAKE_OBJECT_NAME"); @@ -1195,7 +1195,7 @@ public: { // Construct the name of the next object. this->NextObject = this->LocalGenerator->Convert( - obj, cmLocalGenerator::START_OUTPUT, cmLocalGenerator::RESPONSE); + obj, cmOutputConverter::START_OUTPUT, cmOutputConverter::RESPONSE); // Roll over to next string if the limit will be exceeded. if (this->LengthLimit != std::string::npos && @@ -1249,8 +1249,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( std::string buildTargetRuleName = dir; buildTargetRuleName += relink ? "/preinstall" : "/build"; buildTargetRuleName = - this->Convert(buildTargetRuleName, cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::UNCHANGED); + this->Convert(buildTargetRuleName, cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::UNCHANGED); // Build the list of target outputs to drive. std::vector depends; @@ -1438,8 +1438,8 @@ void cmMakefileTargetGenerator::CreateLinkScript( // Create the makefile command to invoke the link script. std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; - link_command += this->Convert(linkScriptName, cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::SHELL); + link_command += this->Convert( + linkScriptName, cmOutputConverter::START_OUTPUT, cmOutputConverter::SHELL); link_command += " --verbose=$(VERBOSE)"; makefile_commands.push_back(link_command); makefile_depends.push_back(linkScriptName); @@ -1496,8 +1496,8 @@ void cmMakefileTargetGenerator::CreateLinkLibs( // Reference the response file. linkLibs = responseFlag; - linkLibs += - this->Convert(link_rsp, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + linkLibs += this->Convert(link_rsp, cmOutputConverter::NONE, + cmOutputConverter::SHELL); } } @@ -1545,8 +1545,8 @@ void cmMakefileTargetGenerator::CreateObjectLists( // Reference the response file. buildObjs += responseFlag; - buildObjs += this->Convert(objects_rsp, cmLocalGenerator::NONE, - cmLocalGenerator::SHELL); + buildObjs += this->Convert(objects_rsp, cmOutputConverter::NONE, + cmOutputConverter::SHELL); } } else if (useLinkScript) { if (!useArchiveRules) { diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 697f123e4..6e44e8f78 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -48,8 +48,8 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() << "# Include the progress variables for this target.\n" << this->GlobalGenerator->IncludeDirective << " " << root << this->Convert(this->ProgressFileNameFull, - cmLocalGenerator::HOME_OUTPUT, - cmLocalGenerator::MAKERULE) + cmOutputConverter::HOME_OUTPUT, + cmOutputConverter::MAKERULE) << "\n\n"; } diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 8d7a89272..90022c0a6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -255,7 +255,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) !this->GetGeneratorTarget()->IsFrameworkOnApple()) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( - cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); if (targetType == cmState::EXECUTABLE) this->GetGlobalGenerator()->AddRule( "CMAKE_SYMLINK_EXECUTABLE", @@ -304,7 +304,7 @@ std::vector cmNinjaNormalTargetGenerator::ComputeLinkCmd() { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( - cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); linkCmds.push_back(cmakeCommand + " -E remove $TARGET_FILE"); } // TODO: Use ARCHIVE_APPEND for archives over a certain size. @@ -432,7 +432,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator(); vars["TARGET_FILE"] = - localGen.ConvertToOutputFormat(targetOutputReal, cmLocalGenerator::SHELL); + localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL); localGen.GetTargetFlags(vars["LINK_LIBRARIES"], vars["FLAGS"], vars["LINK_FLAGS"], frameworkPath, linkPath, @@ -445,7 +445,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() name_of_def_file += ".def "; vars["LINK_FLAGS"] += " /DEF:"; vars["LINK_FLAGS"] += this->GetLocalGenerator()->ConvertToOutputFormat( - name_of_def_file.c_str(), cmLocalGenerator::SHELL); + name_of_def_file.c_str(), cmOutputConverter::SHELL); } } @@ -492,7 +492,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName); if (!install_dir.empty()) { vars["INSTALLNAME_DIR"] = localGen.Convert( - install_dir, cmLocalGenerator::NONE, cmLocalGenerator::SHELL); + install_dir, cmOutputConverter::NONE, cmOutputConverter::SHELL); } } } @@ -501,7 +501,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (!this->TargetNameImport.empty()) { const std::string impLibPath = localGen.ConvertToOutputFormat( - targetOutputImplib, cmLocalGenerator::SHELL); + targetOutputImplib, cmOutputConverter::SHELL); vars["TARGET_IMPLIB"] = impLibPath; EnsureParentDirectoryExists(impLibPath); if (genTarget.HasImportLibrary()) { @@ -526,7 +526,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() const std::string objPath = GetGeneratorTarget()->GetSupportDirectory(); vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat( - this->ConvertToNinjaPath(objPath), cmLocalGenerator::SHELL); + this->ConvertToNinjaPath(objPath), cmOutputConverter::SHELL); EnsureDirectoryExists(objPath); if (this->GetGlobalGenerator()->IsGCCOnWindows()) { @@ -565,20 +565,20 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() if (gt.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS")) { std::string cmakeCommand = this->GetLocalGenerator()->ConvertToOutputFormat( - cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); std::string name_of_def_file = gt.GetSupportDirectory(); name_of_def_file += "/" + gt.GetName(); name_of_def_file += ".def"; std::string cmd = cmakeCommand; cmd += " -E __create_def "; cmd += this->GetLocalGenerator()->ConvertToOutputFormat( - name_of_def_file.c_str(), cmLocalGenerator::SHELL); + name_of_def_file.c_str(), cmOutputConverter::SHELL); cmd += " "; cmNinjaDeps objs = this->GetObjects(); std::string obj_list_file = name_of_def_file; obj_list_file += ".objs"; cmd += this->GetLocalGenerator()->ConvertToOutputFormat( - obj_list_file.c_str(), cmLocalGenerator::SHELL); + obj_list_file.c_str(), cmOutputConverter::SHELL); preLinkCmdLines.push_back(cmd); // create a list of obj files for the -E __create_def to read cmGeneratedFileStream fout(obj_list_file.c_str()); @@ -593,7 +593,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() // the link commands. if (!preLinkCmdLines.empty()) { const std::string homeOutDir = localGen.ConvertToOutputFormat( - localGen.GetBinaryDirectory(), cmLocalGenerator::SHELL); + localGen.GetBinaryDirectory(), cmOutputConverter::SHELL); preLinkCmdLines.push_back("cd " + homeOutDir); } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 4d58242a5..86db8e0d6 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -274,10 +274,10 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const } vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat( - ConvertToNinjaPath(pdbPath), cmLocalGenerator::SHELL); + ConvertToNinjaPath(pdbPath), cmOutputConverter::SHELL); vars["TARGET_COMPILE_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat( - ConvertToNinjaPath(compilePdbPath), cmLocalGenerator::SHELL); + ConvertToNinjaPath(compilePdbPath), cmOutputConverter::SHELL); EnsureParentDirectoryExists(pdbPath); EnsureParentDirectoryExists(compilePdbPath); @@ -383,7 +383,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) const char* tidy = this->GeneratorTarget->GetProperty(tidy_prop); if ((iwyu && *iwyu) || (tidy && *tidy)) { std::string run_iwyu = this->GetLocalGenerator()->ConvertToOutputFormat( - cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL); + cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); run_iwyu += " -E __run_iwyu"; if (iwyu && *iwyu) { run_iwyu += " --iwyu="; @@ -584,9 +584,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( EnsureParentDirectoryExists(objectFileName); vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat( - objectDir, cmLocalGenerator::SHELL); + objectDir, cmOutputConverter::SHELL); vars["OBJECT_FILE_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat( - objectFileDir, cmLocalGenerator::SHELL); + objectFileDir, cmOutputConverter::SHELL); this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(), vars); @@ -634,7 +634,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( } escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat( - escapedSourceFileName, cmLocalGenerator::SHELL); + escapedSourceFileName, cmOutputConverter::SHELL); compileObjectVars.Source = escapedSourceFileName.c_str(); compileObjectVars.Object = objectFileName.c_str(); diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index d07341c80..f7a7f38c8 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -111,14 +111,14 @@ void cmNinjaUtilityTargetGenerator::Generate() this->GetLocalGenerator() ->ConvertToOutputFormat( this->GetLocalGenerator()->GetSourceDirectory(), - cmLocalGenerator::SHELL) + cmOutputConverter::SHELL) .c_str()); cmSystemTools::ReplaceString( command, "$(CMAKE_BINARY_DIR)", this->GetLocalGenerator() ->ConvertToOutputFormat( this->GetLocalGenerator()->GetBinaryDirectory(), - cmLocalGenerator::SHELL) + cmOutputConverter::SHELL) .c_str()); cmSystemTools::ReplaceString(command, "$(ARGS)", ""); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3d93e6901..6121b281b 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2404,8 +2404,8 @@ void cmVisualStudio10TargetGenerator::AddLibraries( for (ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) { if (l->IsPath) { std::string path = this->LocalGenerator->Convert( - l->Value.c_str(), cmLocalGenerator::START_OUTPUT, - cmLocalGenerator::UNCHANGED); + l->Value.c_str(), cmOutputConverter::START_OUTPUT, + cmOutputConverter::UNCHANGED); this->ConvertToWindowsSlash(path); libVec.push_back(path); } else if (!l->Target ||