mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
cmLocalCommonGenerator: factor out GetTargetDirectory
This commit is contained in:
@@ -89,6 +89,18 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags(
|
||||
return flags;
|
||||
}
|
||||
|
||||
std::string cmLocalCommonGenerator::GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const
|
||||
{
|
||||
std::string dir = cmStrCat("CMakeFiles/", target->GetName());
|
||||
#if defined(__VMS)
|
||||
dir += "_dir";
|
||||
#else
|
||||
dir += ".dir";
|
||||
#endif
|
||||
return dir;
|
||||
}
|
||||
|
||||
void cmLocalCommonGenerator::ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, std::string>& mapping,
|
||||
cmGeneratorTarget const* gt)
|
||||
|
||||
@@ -34,6 +34,9 @@ public:
|
||||
std::string GetTargetFortranFlags(cmGeneratorTarget const* target,
|
||||
std::string const& config) override;
|
||||
|
||||
std::string GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const override;
|
||||
|
||||
void ComputeObjectFilenames(
|
||||
std::map<cmSourceFile const*, std::string>& mapping,
|
||||
cmGeneratorTarget const* gt = nullptr) override;
|
||||
|
||||
@@ -173,19 +173,6 @@ void cmLocalNinjaGenerator::Generate()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Picked up from cmLocalUnixMakefileGenerator3. Refactor it.
|
||||
std::string cmLocalNinjaGenerator::GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const
|
||||
{
|
||||
std::string dir = cmStrCat("CMakeFiles/", target->GetName());
|
||||
#if defined(__VMS)
|
||||
dir += "_dir";
|
||||
#else
|
||||
dir += ".dir";
|
||||
#endif
|
||||
return dir;
|
||||
}
|
||||
|
||||
// Non-virtual public methods.
|
||||
|
||||
cmGlobalNinjaGenerator const* cmLocalNinjaGenerator::GetGlobalNinjaGenerator()
|
||||
|
||||
@@ -49,9 +49,6 @@ public:
|
||||
cmBuildStep buildStep, cmGeneratorTarget const* target,
|
||||
std::string const& language) override;
|
||||
|
||||
std::string GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const override;
|
||||
|
||||
cmGlobalNinjaGenerator const* GetGlobalNinjaGenerator() const;
|
||||
cmGlobalNinjaGenerator* GetGlobalNinjaGenerator();
|
||||
|
||||
|
||||
@@ -2246,18 +2246,6 @@ std::string cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string cmLocalUnixMakefileGenerator3::GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const
|
||||
{
|
||||
std::string dir = cmStrCat("CMakeFiles/", target->GetName());
|
||||
#if defined(__VMS)
|
||||
dir += "_dir";
|
||||
#else
|
||||
dir += ".dir";
|
||||
#endif
|
||||
return dir;
|
||||
}
|
||||
|
||||
cmLocalUnixMakefileGenerator3::ImplicitDependLanguageMap const&
|
||||
cmLocalUnixMakefileGenerator3::GetImplicitDepends(
|
||||
cmGeneratorTarget const* tgt, cmDependencyScannerKind scanner)
|
||||
|
||||
@@ -122,9 +122,6 @@ public:
|
||||
/** Get whether the makefile is to have color. */
|
||||
bool GetColorMakefile() const { return this->ColorMakefile; }
|
||||
|
||||
std::string GetTargetDirectory(
|
||||
cmGeneratorTarget const* target) const override;
|
||||
|
||||
// create a command that cds to the start dir then runs the commands
|
||||
void CreateCDCommand(std::vector<std::string>& commands,
|
||||
std::string const& targetDir,
|
||||
|
||||
Reference in New Issue
Block a user