[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5764-g808d7d2

Brad King brad.king at kitware.com
Mon Nov 25 10:49:25 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  808d7d290e079c4bf7a2729d1158a77b4d113167 (commit)
       via  b54c336e462b52ce400335feaba483f9f3da16ad (commit)
       via  9414217b3b04cd4bdc40d7daddd0b05d9e3c01c1 (commit)
       via  644e0128633d34d5ea31ad2bfe10d0fc399ba899 (commit)
      from  e1b759dda9ac32771bc037f0664befd24ce0e3a5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=808d7d290e079c4bf7a2729d1158a77b4d113167
commit 808d7d290e079c4bf7a2729d1158a77b4d113167
Merge: e1b759d b54c336
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 25 10:49:19 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 25 10:49:19 2013 -0500

    Merge topic 'KateProjectGenerator2' into next
    
    b54c336 kate: add some documentation
    9414217 kate: insert build targets
    644e012 kate: add project generator for the Kate project plugin


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b54c336e462b52ce400335feaba483f9f3da16ad
commit b54c336e462b52ce400335feaba483f9f3da16ad
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Nov 16 16:13:13 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 25 10:48:39 2013 -0500

    kate: add some documentation
    
    Alex

diff --git a/Help/generator/Kate.rst b/Help/generator/Kate.rst
new file mode 100644
index 0000000..9b61a93
--- /dev/null
+++ b/Help/generator/Kate.rst
@@ -0,0 +1,26 @@
+Kate
+----
+
+Generates Kate project files.
+
+A project file for Kate will be created in the top directory in the top level
+build directory.
+To use it in kate, the Project plugin must be enabled.
+The project file is loaded in kate simply by opening the
+ProjectName.kateproject file in the editor.
+If the kate Build-plugin is enabled, all targets generated by CMake are
+available for building.
+
+This "extra" generator may be specified as:
+
+``Kate - MinGW Makefiles``
+ Generate with :generator:`MinGW Makefiles`.
+
+``Kate - NMake Makefiles``
+ Generate with :generator:`NMake Makefiles`.
+
+``Kate - Ninja``
+ Generate with :generator:`Ninja`.
+
+``Kate - Unix Makefiles``
+ Generate with :generator:`Unix Makefiles`.
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index 93fbf77..b72c7ef 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -81,4 +81,5 @@ The following extra generators are known to CMake.
    /generator/CodeBlocks
    /generator/Eclipse CDT4
    /generator/KDevelop3
+   /generator/Kate
    /generator/Sublime Text 2

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9414217b3b04cd4bdc40d7daddd0b05d9e3c01c1
commit 9414217b3b04cd4bdc40d7daddd0b05d9e3c01c1
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Mon May 20 17:28:00 2013 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 25 10:48:34 2013 -0500

    kate: insert build targets
    
    This can be used by the build plugin in kate.
    Code is quite similar to the one for Eclipse.
    
    Alex

diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index de3da15..f020ddb 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -74,18 +74,146 @@ void cmExtraKateGenerator::CreateKateProjectFile(const cmMakefile* mf) const
     "{\n"
     "\t\"name\": \"" << this->ProjectName << "\",\n"
     "\t\"directory\": \"" << mf->GetHomeDirectory() << "\",\n"
-    "\t\"files\": [ { " << this->GenerateFilesString(mf) << "} ],\n"
-    "\t\"build\": {\n"
-    "\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n"
-    "\t\t\"build\": \"" << make << " " << args <<" all\",\n"
-    "\t\t\"clean\": \"" << make << " clean\",\n"
-    "\t\t\"quick\": \"" << make << " help\"\n"
-    "\t}\n"
-    "}\n";
+    "\t\"files\": [ { " << this->GenerateFilesString(mf) << "} ],\n";
+  this->WriteTargets(mf, fout);
+  fout << "}\n";
 }
 
 
 void
+cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
+                                   cmGeneratedFileStream& fout) const
+{
+  fout <<
+  "\t\"build\": {\n"
+  "\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n"
+  "\t\t\"default_target\": \"all\",\n"
+  "\t\t\"prev_target\": \"all\",\n"
+  "\t\t\"clean_target\": \"clean\",\n"
+  "\t\t\"targets\":[\n";
+
+  const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+  const std::string makeArgs = mf->GetSafeDefinition(
+                                              "CMAKE_KATE_MAKE_ARGUMENTS");
+
+  this->AppendTarget(fout, "all", make, makeArgs,
+                     mf->GetHomeOutputDirectory());
+  this->AppendTarget(fout, "clean", make, makeArgs,
+                     mf->GetHomeOutputDirectory());
+
+  // add all executable and library targets and some of the GLOBAL
+  // and UTILITY targets
+  for (std::vector<cmLocalGenerator*>::const_iterator
+       it = this->GlobalGenerator->GetLocalGenerators().begin();
+       it != this->GlobalGenerator->GetLocalGenerators().end();
+       ++it)
+    {
+    const cmTargets& targets = (*it)->GetMakefile()->GetTargets();
+    cmMakefile* makefile=(*it)->GetMakefile();
+    std::string currentDir = makefile->GetCurrentOutputDirectory();
+    bool topLevel = (currentDir == makefile->GetHomeOutputDirectory());
+
+    for(cmTargets::const_iterator ti=targets.begin(); ti!=targets.end(); ++ti)
+      {
+      switch(ti->second.GetType())
+        {
+        case cmTarget::GLOBAL_TARGET:
+          {
+          bool insertTarget = false;
+          // Only add the global targets from CMAKE_BINARY_DIR,
+          // not from the subdirs
+          if (topLevel)
+            {
+            insertTarget = true;
+            // only add the "edit_cache" target if it's not ccmake, because
+            // this will not work within the IDE
+            if (ti->first == "edit_cache")
+              {
+              const char* editCommand = makefile->GetDefinition
+              ("CMAKE_EDIT_COMMAND");
+              if (editCommand == 0)
+                {
+                insertTarget = false;
+                }
+              else if (strstr(editCommand, "ccmake")!=NULL)
+                {
+                insertTarget = false;
+                }
+              }
+            }
+          if (insertTarget)
+            {
+            this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+            }
+        }
+        break;
+        case cmTarget::UTILITY:
+          // Add all utility targets, except the Nightly/Continuous/
+          // Experimental-"sub"targets as e.g. NightlyStart
+          if (((ti->first.find("Nightly")==0)   &&(ti->first!="Nightly"))
+            || ((ti->first.find("Continuous")==0)&&(ti->first!="Continuous"))
+            || ((ti->first.find("Experimental")==0)
+            && (ti->first!="Experimental")))
+            {
+              break;
+            }
+
+            this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+          break;
+        case cmTarget::EXECUTABLE:
+        case cmTarget::STATIC_LIBRARY:
+        case cmTarget::SHARED_LIBRARY:
+        case cmTarget::MODULE_LIBRARY:
+        case cmTarget::OBJECT_LIBRARY:
+        {
+          this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+          std::string fastTarget = ti->first;
+          fastTarget += "/fast";
+          this->AppendTarget(fout, fastTarget, make, makeArgs, currentDir);
+
+        }
+        break;
+        default:
+          break;
+      }
+    }
+
+    //insert rules for compiling, preprocessing and assembling individual files
+    std::vector<std::string> objectFileTargets;
+    (*it)->GetIndividualFileTargets(objectFileTargets);
+    for(std::vector<std::string>::const_iterator fit=objectFileTargets.begin();
+        fit != objectFileTargets.end();
+        ++fit)
+      {
+      this->AppendTarget(fout, *fit, make, makeArgs, currentDir);
+      }
+  }
+
+  fout <<
+  "\t] }\n";
+}
+
+
+void
+cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout,
+                                   const std::string&     target,
+                                   const std::string&     make,
+                                   const std::string&     makeArgs,
+                                   const std::string&     path) const
+{
+  static char JsonSep = ' ';
+
+  fout <<
+    "\t\t\t" << JsonSep << "{\"name\":\"" << target << "\", "
+    "\"build_cmd\":\"" << make << " -C " << path << " " << makeArgs << " "
+                       << target << "\"}\n";
+
+  JsonSep = ',';
+}
+
+
+
+void
 cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
 {
   std::string filename = mf->GetHomeOutputDirectory();
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index 19147f2..4979eff 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -41,6 +41,13 @@ public:
 private:
   void CreateKateProjectFile(const cmMakefile* mf) const;
   void CreateDummyKateProjectFile(const cmMakefile* mf) const;
+  void WriteTargets(const cmMakefile* mf, cmGeneratedFileStream& fout) const;
+  void AppendTarget(cmGeneratedFileStream& fout,
+                    const std::string&     target,
+                    const std::string&     make,
+                    const std::string&     makeArgs,
+                    const std::string&     path) const;
+
   std::string GenerateFilesString(const cmMakefile* mf) const;
   std::string GetPathBasename(const std::string& path) const;
   std::string GenerateProjectName(const std::string& name,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=644e0128633d34d5ea31ad2bfe10d0fc399ba899
commit 644e0128633d34d5ea31ad2bfe10d0fc399ba899
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Nov 16 15:41:32 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 25 10:48:33 2013 -0500

    kate: add project generator for the Kate project plugin
    
    This patch adds an extra generator for KDE's kate text editor,
    or better more specifically, the project plugin.
    
    Alex

diff --git a/Modules/CMakeFindKate.cmake b/Modules/CMakeFindKate.cmake
new file mode 100644
index 0000000..4dcdb28
--- /dev/null
+++ b/Modules/CMakeFindKate.cmake
@@ -0,0 +1,31 @@
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# This file is included in CMakeSystemSpecificInformation.cmake if
+# the Eclipse CDT4 extra generator has been selected.
+
+
+# Try to find out how many CPUs we have and set the -j argument for make accordingly
+
+include(ProcessorCount)
+processorcount(_CMAKE_KATE_PROCESSOR_COUNT)
+
+# Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name
+# (we may also get here in the future e.g. for ninja)
+if("${_CMAKE_KATE_PROCESSOR_COUNT}" GREATER 1  AND  CMAKE_HOST_UNIX  AND  "${CMAKE_MAKE_PROGRAM}" MATCHES make)
+  set(_CMAKE_KATE_INITIAL_MAKE_ARGS "-j${_CMAKE_KATE_PROCESSOR_COUNT}")
+endif()
+
+# This variable is used by the Eclipse generator and appended to the make invocation commands.
+set(CMAKE_KATE_MAKE_ARGUMENTS "${_CMAKE_KATE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Kate invokes make. Enter e.g. -j<some_number> to get parallel builds")
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 570b7e2..17fb52d 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -188,6 +188,8 @@ set(SRCS
   cmExtraCodeBlocksGenerator.h
   cmExtraEclipseCDT4Generator.cxx
   cmExtraEclipseCDT4Generator.h
+  cmExtraKateGenerator.cxx
+  cmExtraKateGenerator.h
   cmExtraSublimeTextGenerator.cxx
   cmExtraSublimeTextGenerator.h
   cmFileTimeComparison.cxx
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
new file mode 100644
index 0000000..de3da15
--- /dev/null
+++ b/Source/cmExtraKateGenerator.cxx
@@ -0,0 +1,244 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2004-2009 Kitware, Inc.
+  Copyright 2004 Alexander Neundorf (neundorf at kde.org)
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "cmExtraKateGenerator.h"
+#include "cmGlobalUnixMakefileGenerator3.h"
+#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmMakefile.h"
+#include "cmake.h"
+#include "cmSourceFile.h"
+#include "cmGeneratedFileStream.h"
+#include "cmTarget.h"
+#include "cmSystemTools.h"
+#include "cmXMLSafe.h"
+
+#include <cmsys/SystemTools.hxx>
+
+//----------------------------------------------------------------------------
+void cmExtraKateGenerator
+::GetDocumentation(cmDocumentationEntry& entry, const char*) const
+{
+  entry.Name = this->GetName();
+  entry.Brief = "Generates Kate project files.";
+}
+
+cmExtraKateGenerator::cmExtraKateGenerator()
+:cmExternalMakefileProjectGenerator()
+{
+#if defined(_WIN32)
+  this->SupportedGlobalGenerators.push_back("MinGW Makefiles");
+  this->SupportedGlobalGenerators.push_back("NMake Makefiles");
+// disable until somebody actually tests it:
+//  this->SupportedGlobalGenerators.push_back("MSYS Makefiles");
+#endif
+  this->SupportedGlobalGenerators.push_back("Ninja");
+  this->SupportedGlobalGenerators.push_back("Unix Makefiles");
+}
+
+
+void cmExtraKateGenerator::Generate()
+{
+  const cmMakefile* mf
+     = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
+  this->ProjectName = this->GenerateProjectName(mf->GetProjectName(),
+                          mf->GetSafeDefinition("CMAKE_BUILD_TYPE"),
+                          this->GetPathBasename(mf->GetHomeOutputDirectory()));
+  this->CreateKateProjectFile(mf);
+  this->CreateDummyKateProjectFile(mf);
+}
+
+
+void cmExtraKateGenerator::CreateKateProjectFile(const cmMakefile* mf) const
+{
+  std::string filename = mf->GetHomeOutputDirectory();
+  filename += "/.kateproject";
+  cmGeneratedFileStream fout(filename.c_str());
+  if (!fout)
+    {
+    return;
+    }
+
+  std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+  std::string args = mf->GetRequiredDefinition("CMAKE_KATE_MAKE_ARGUMENTS");
+
+  fout <<
+    "{\n"
+    "\t\"name\": \"" << this->ProjectName << "\",\n"
+    "\t\"directory\": \"" << mf->GetHomeDirectory() << "\",\n"
+    "\t\"files\": [ { " << this->GenerateFilesString(mf) << "} ],\n"
+    "\t\"build\": {\n"
+    "\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n"
+    "\t\t\"build\": \"" << make << " " << args <<" all\",\n"
+    "\t\t\"clean\": \"" << make << " clean\",\n"
+    "\t\t\"quick\": \"" << make << " help\"\n"
+    "\t}\n"
+    "}\n";
+}
+
+
+void
+cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
+{
+  std::string filename = mf->GetHomeOutputDirectory();
+  filename += "/";
+  filename += this->ProjectName;
+  filename += ".kateproject";
+  cmGeneratedFileStream fout(filename.c_str());
+  if (!fout)
+    {
+    return;
+    }
+
+  fout << "#Generated by cmake, do not edit.\n";
+}
+
+
+std::string
+cmExtraKateGenerator::GenerateFilesString(const cmMakefile* mf) const
+{
+  std::string s = mf->GetHomeDirectory();
+  s += "/.git";
+  if(cmSystemTools::FileExists(s.c_str()))
+  {
+    return std::string("\"git\": 1 ");
+  }
+
+  s = mf->GetHomeDirectory();
+  s += "/.svn";
+  if(cmSystemTools::FileExists(s.c_str()))
+  {
+    return std::string("\"svn\": 1 ");
+  }
+
+  s = mf->GetHomeDirectory();
+  s += "/";
+
+  std::set<std::string> files;
+  std::string tmp;
+  const std::vector<cmLocalGenerator *>& lgs =
+                                   this->GlobalGenerator->GetLocalGenerators();
+
+  for (std::vector<cmLocalGenerator*>::const_iterator it=lgs.begin();
+       it!=lgs.end(); it++)
+    {
+    cmMakefile* makefile=(*it)->GetMakefile();
+    const std::vector<std::string>& listFiles=makefile->GetListFiles();
+    for (std::vector<std::string>::const_iterator lt=listFiles.begin();
+         lt!=listFiles.end(); lt++)
+      {
+      tmp=*lt;
+        {
+        files.insert(tmp);
+        }
+      }
+
+    const std::vector<cmSourceFile*>& sources = makefile->GetSourceFiles();
+    for (std::vector<cmSourceFile*>::const_iterator sfIt = sources.begin();
+         sfIt != sources.end(); sfIt++)
+      {
+      cmSourceFile* sf = *sfIt;
+      if (sf->GetPropertyAsBool("GENERATED"))
+        {
+        continue;
+        }
+
+      tmp = sf->GetFullPath();
+      files.insert(tmp);
+      }
+    }
+
+  const char* sep = "";
+  tmp = "\"list\": [";
+  for(std::set<std::string>::const_iterator it = files.begin();
+      it != files.end(); ++it)
+    {
+    tmp += sep;
+    tmp += " \"";
+    tmp += *it;
+    tmp += "\"";
+    sep = ",";
+    }
+  tmp += "] ";
+
+  return tmp;
+}
+
+
+std::string cmExtraKateGenerator::GenerateProjectName(const std::string& name,
+                                                 const std::string& type,
+                                                 const std::string& path) const
+{
+  return name + (type.empty() ? "" : "-") + type + "@" + path;
+}
+
+
+std::string cmExtraKateGenerator::GetPathBasename(const std::string& path)const
+{
+  std::string outputBasename = path;
+  while (outputBasename.size() > 0 &&
+         (outputBasename[outputBasename.size() - 1] == '/' ||
+          outputBasename[outputBasename.size() - 1] == '\\'))
+    {
+    outputBasename.resize(outputBasename.size() - 1);
+    }
+  std::string::size_type loc = outputBasename.find_last_of("/\\");
+  if (loc != std::string::npos)
+    {
+    outputBasename = outputBasename.substr(loc + 1);
+    }
+
+  return outputBasename;
+}
+
+
+// Create the command line for building the given target using the selected
+// make
+std::string cmExtraKateGenerator::BuildMakeCommand(const std::string& make,
+                                const char* makefile, const char* target) const
+{
+  std::string command = make;
+  if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
+    {
+    std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
+    command += " /NOLOGO /f &quot;";
+    command += makefileName;
+    command += "&quot; ";
+    command += " VERBOSE=1 ";
+    command += target;
+    }
+  else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
+    {
+    // no escaping of spaces in this case, see
+    // http://public.kitware.com/Bug/view.php?id=10014
+    std::string makefileName = makefile;
+    command += " -f &quot;";
+    command += makefileName;
+    command += "&quot; ";
+    command += " VERBOSE=1 ";
+    command += target;
+    }
+  else if (strcmp(this->GlobalGenerator->GetName(), "Ninja")==0)
+    {
+    command += " -v ";
+    command += target;
+    }
+  else
+    {
+    std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
+    command += " -f &quot;";
+    command += makefileName;
+    command += "&quot; ";
+    command += " VERBOSE=1 ";
+    command += target;
+    }
+  return command;
+}
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
new file mode 100644
index 0000000..19147f2
--- /dev/null
+++ b/Source/cmExtraKateGenerator.h
@@ -0,0 +1,55 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2004-2009 Kitware, Inc.
+  Copyright 2013 Alexander Neundorf (neundorf at kde.org)
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#ifndef cmExtraKateGenerator_h
+#define cmExtraKateGenerator_h
+
+#include "cmExternalMakefileProjectGenerator.h"
+
+class cmLocalGenerator;
+class cmMakefile;
+class cmTarget;
+class cmGeneratedFileStream;
+
+/** \class cmExtraKateGenerator
+ * \brief Write Kate project files for Makefile or ninja based projects
+ */
+class cmExtraKateGenerator : public cmExternalMakefileProjectGenerator
+{
+public:
+  cmExtraKateGenerator();
+
+  virtual const char* GetName() const
+                         { return cmExtraKateGenerator::GetActualName();}
+  static const char* GetActualName()                    { return "Kate";}
+  static cmExternalMakefileProjectGenerator* New()
+                                     { return new cmExtraKateGenerator; }
+  /** Get the documentation entry for this generator.  */
+  virtual void GetDocumentation(cmDocumentationEntry& entry,
+                                const char* fullName) const;
+
+  virtual void Generate();
+private:
+  void CreateKateProjectFile(const cmMakefile* mf) const;
+  void CreateDummyKateProjectFile(const cmMakefile* mf) const;
+  std::string GenerateFilesString(const cmMakefile* mf) const;
+  std::string GetPathBasename(const std::string& path) const;
+  std::string GenerateProjectName(const std::string& name,
+                                  const std::string& type,
+                                  const std::string& path) const;
+  std::string BuildMakeCommand(const std::string& make,
+                               const char* makefile, const char* target) const;
+
+  std::string ProjectName;
+};
+
+#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index bf27c78..741e263 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -73,6 +73,7 @@
 # include "cmExtraCodeBlocksGenerator.h"
 #endif
 #include "cmExtraSublimeTextGenerator.h"
+#include "cmExtraKateGenerator.h"
 
 #ifdef CMAKE_USE_KDEVELOP
 # include "cmGlobalKdevelopGenerator.h"
@@ -991,6 +992,8 @@ void cmake::AddDefaultExtraGenerators()
                           &cmExtraCodeBlocksGenerator::New);
   this->AddExtraGenerator(cmExtraSublimeTextGenerator::GetActualName(),
                           &cmExtraSublimeTextGenerator::New);
+  this->AddExtraGenerator(cmExtraKateGenerator::GetActualName(),
+                          &cmExtraKateGenerator::New);
 
 #ifdef CMAKE_USE_ECLIPSE
   this->AddExtraGenerator(cmExtraEclipseCDT4Generator::GetActualName(),

-----------------------------------------------------------------------

Summary of changes:
 Help/generator/Kate.rst            |   26 +++
 Help/manual/cmake-generators.7.rst |    1 +
 Modules/CMakeFindKate.cmake        |   31 +++
 Source/CMakeLists.txt              |    2 +
 Source/cmExtraKateGenerator.cxx    |  372 ++++++++++++++++++++++++++++++++++++
 Source/cmExtraKateGenerator.h      |   62 ++++++
 Source/cmake.cxx                   |    3 +
 7 files changed, 497 insertions(+), 0 deletions(-)
 create mode 100644 Help/generator/Kate.rst
 create mode 100644 Modules/CMakeFindKate.cmake
 create mode 100644 Source/cmExtraKateGenerator.cxx
 create mode 100644 Source/cmExtraKateGenerator.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list