Kate: Port API to cmLocalGenerator.
This commit is contained in:
parent
e46ef270ed
commit
10cf42f5ae
|
@ -53,13 +53,15 @@ void cmExtraKateGenerator::Generate()
|
||||||
this->GetPathBasename(mf->GetHomeOutputDirectory()));
|
this->GetPathBasename(mf->GetHomeOutputDirectory()));
|
||||||
this->UseNinja = (this->GlobalGenerator->GetName() == "Ninja");
|
this->UseNinja = (this->GlobalGenerator->GetName() == "Ninja");
|
||||||
|
|
||||||
this->CreateKateProjectFile(mf);
|
this->CreateKateProjectFile(lg);
|
||||||
this->CreateDummyKateProjectFile(mf);
|
this->CreateDummyKateProjectFile(lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cmExtraKateGenerator::CreateKateProjectFile(const cmMakefile* mf) const
|
void cmExtraKateGenerator::CreateKateProjectFile(
|
||||||
|
const cmLocalGenerator* lg) const
|
||||||
{
|
{
|
||||||
|
const cmMakefile* mf = lg->GetMakefile();
|
||||||
std::string filename = mf->GetHomeOutputDirectory();
|
std::string filename = mf->GetHomeOutputDirectory();
|
||||||
filename += "/.kateproject";
|
filename += "/.kateproject";
|
||||||
cmGeneratedFileStream fout(filename.c_str());
|
cmGeneratedFileStream fout(filename.c_str());
|
||||||
|
@ -82,9 +84,10 @@ void cmExtraKateGenerator::CreateKateProjectFile(const cmMakefile* mf) const
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
|
cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
|
||||||
cmGeneratedFileStream& fout) const
|
cmGeneratedFileStream& fout) const
|
||||||
{
|
{
|
||||||
|
cmMakefile* mf = lg->GetMakefile();
|
||||||
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
const std::string makeArgs = mf->GetSafeDefinition(
|
const std::string makeArgs = mf->GetSafeDefinition(
|
||||||
"CMAKE_KATE_MAKE_ARGUMENTS");
|
"CMAKE_KATE_MAKE_ARGUMENTS");
|
||||||
|
@ -234,8 +237,10 @@ cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
|
cmExtraKateGenerator::CreateDummyKateProjectFile(
|
||||||
|
const cmLocalGenerator* lg) const
|
||||||
{
|
{
|
||||||
|
cmMakefile* mf = lg->GetMakefile();
|
||||||
std::string filename = mf->GetHomeOutputDirectory();
|
std::string filename = mf->GetHomeOutputDirectory();
|
||||||
filename += "/";
|
filename += "/";
|
||||||
filename += this->ProjectName;
|
filename += this->ProjectName;
|
||||||
|
@ -252,8 +257,9 @@ cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
|
||||||
|
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
cmExtraKateGenerator::GenerateFilesString(const cmMakefile* mf) const
|
cmExtraKateGenerator::GenerateFilesString(const cmLocalGenerator* lg) const
|
||||||
{
|
{
|
||||||
|
cmMakefile* mf = lg->GetMakefile();
|
||||||
std::string s = mf->GetHomeDirectory();
|
std::string s = mf->GetHomeDirectory();
|
||||||
s += "/.git";
|
s += "/.git";
|
||||||
if(cmSystemTools::FileExists(s.c_str()))
|
if(cmSystemTools::FileExists(s.c_str()))
|
||||||
|
|
|
@ -39,9 +39,10 @@ public:
|
||||||
|
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
private:
|
private:
|
||||||
void CreateKateProjectFile(const cmMakefile* mf) const;
|
void CreateKateProjectFile(const cmLocalGenerator* lg) const;
|
||||||
void CreateDummyKateProjectFile(const cmMakefile* mf) const;
|
void CreateDummyKateProjectFile(const cmLocalGenerator* lg) const;
|
||||||
void WriteTargets(const cmMakefile* mf, cmGeneratedFileStream& fout) const;
|
void WriteTargets(const cmLocalGenerator* lg,
|
||||||
|
cmGeneratedFileStream& fout) const;
|
||||||
void AppendTarget(cmGeneratedFileStream& fout,
|
void AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const std::string& target,
|
const std::string& target,
|
||||||
const std::string& make,
|
const std::string& make,
|
||||||
|
@ -49,7 +50,7 @@ private:
|
||||||
const std::string& path,
|
const std::string& path,
|
||||||
const char* homeOutputDir) const;
|
const char* homeOutputDir) const;
|
||||||
|
|
||||||
std::string GenerateFilesString(const cmMakefile* mf) const;
|
std::string GenerateFilesString(const cmLocalGenerator* lg) const;
|
||||||
std::string GetPathBasename(const std::string& path) const;
|
std::string GetPathBasename(const std::string& path) const;
|
||||||
std::string GenerateProjectName(const std::string& name,
|
std::string GenerateProjectName(const std::string& name,
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
|
|
Loading…
Reference in New Issue