summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-06 22:49:19 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-08 22:00:19 (GMT)
commit10cf42f5ae660c460d5d5f60936250866b33dc94 (patch)
tree7028b7b53297c5b4339cb4922d7e877b05b1cbb4
parente46ef270ed7c96586ed755322174791374241574 (diff)
downloadCMake-10cf42f5ae660c460d5d5f60936250866b33dc94.zip
CMake-10cf42f5ae660c460d5d5f60936250866b33dc94.tar.gz
CMake-10cf42f5ae660c460d5d5f60936250866b33dc94.tar.bz2
Kate: Port API to cmLocalGenerator.
-rw-r--r--Source/cmExtraKateGenerator.cxx18
-rw-r--r--Source/cmExtraKateGenerator.h9
2 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 126e3e1..1305ce2 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -53,13 +53,15 @@ void cmExtraKateGenerator::Generate()
this->GetPathBasename(mf->GetHomeOutputDirectory()));
this->UseNinja = (this->GlobalGenerator->GetName() == "Ninja");
- this->CreateKateProjectFile(mf);
- this->CreateDummyKateProjectFile(mf);
+ this->CreateKateProjectFile(lg);
+ 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();
filename += "/.kateproject";
cmGeneratedFileStream fout(filename.c_str());
@@ -82,9 +84,10 @@ void cmExtraKateGenerator::CreateKateProjectFile(const cmMakefile* mf) const
void
-cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
+cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
cmGeneratedFileStream& fout) const
{
+ cmMakefile* mf = lg->GetMakefile();
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
const std::string makeArgs = mf->GetSafeDefinition(
"CMAKE_KATE_MAKE_ARGUMENTS");
@@ -234,8 +237,10 @@ cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout,
void
-cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
+cmExtraKateGenerator::CreateDummyKateProjectFile(
+ const cmLocalGenerator* lg) const
{
+ cmMakefile* mf = lg->GetMakefile();
std::string filename = mf->GetHomeOutputDirectory();
filename += "/";
filename += this->ProjectName;
@@ -252,8 +257,9 @@ cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
std::string
-cmExtraKateGenerator::GenerateFilesString(const cmMakefile* mf) const
+cmExtraKateGenerator::GenerateFilesString(const cmLocalGenerator* lg) const
{
+ cmMakefile* mf = lg->GetMakefile();
std::string s = mf->GetHomeDirectory();
s += "/.git";
if(cmSystemTools::FileExists(s.c_str()))
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index f800feb..b20d0a7 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -39,9 +39,10 @@ public:
virtual void Generate();
private:
- void CreateKateProjectFile(const cmMakefile* mf) const;
- void CreateDummyKateProjectFile(const cmMakefile* mf) const;
- void WriteTargets(const cmMakefile* mf, cmGeneratedFileStream& fout) const;
+ void CreateKateProjectFile(const cmLocalGenerator* lg) const;
+ void CreateDummyKateProjectFile(const cmLocalGenerator* lg) const;
+ void WriteTargets(const cmLocalGenerator* lg,
+ cmGeneratedFileStream& fout) const;
void AppendTarget(cmGeneratedFileStream& fout,
const std::string& target,
const std::string& make,
@@ -49,7 +50,7 @@ private:
const std::string& path,
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 GenerateProjectName(const std::string& name,
const std::string& type,