[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7263-g8e0e72c

Stephen Kelly steveire at gmail.com
Fri Jan 24 08:40:15 EST 2014


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  8e0e72ccdf62af818a8d648fccf1b602f60a9154 (commit)
       via  c0f60537cf72e40a474e299b82d8c416c006a9b8 (commit)
      from  f030a3a55a25b12401b66e4c0573f78ea2fbb0c1 (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=8e0e72ccdf62af818a8d648fccf1b602f60a9154
commit 8e0e72ccdf62af818a8d648fccf1b602f60a9154
Merge: f030a3a c0f6053
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 08:40:14 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 24 08:40:14 2014 -0500

    Merge topic 'fix-Qt-autogen' into next
    
    c0f60537 QtAutogen: Make some methods appropriately file-static.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0f60537cf72e40a474e299b82d8c416c006a9b8
commit c0f60537cf72e40a474e299b82d8c416c006a9b8
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 14:00:34 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Jan 24 14:39:37 2014 +0100

    QtAutogen: Make some methods appropriately file-static.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 23a3998..166bbe0 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -115,6 +115,15 @@ static void copyTargetProperty(cmTarget* destinationTarget,
 }
 
 
+static std::string ReadAll(const std::string& filename)
+{
+  cmsys::ifstream file(filename.c_str());
+  cmsys_ios::stringstream stream;
+  stream << file.rdbuf();
+  file.close();
+  return stream.str();
+}
+
 cmQtAutoGenerators::cmQtAutoGenerators()
 :Verbose(cmsys::SystemTools::GetEnv("VERBOSE") != 0)
 ,ColorOutput(true)
@@ -960,11 +969,27 @@ void cmQtAutoGenerators::SetupAutoRccTarget(cmTarget const* target)
     }
 }
 
+static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
+                                                  const char* targetDirectory)
+{
+  cmGlobalGenerator* gg = new cmGlobalGenerator();
+  gg->SetCMakeInstance(cm);
+
+  cmLocalGenerator* lg = gg->CreateLocalGenerator();
+  lg->GetMakefile()->SetHomeOutputDirectory(targetDirectory);
+  lg->GetMakefile()->SetStartOutputDirectory(targetDirectory);
+  lg->GetMakefile()->SetHomeDirectory(targetDirectory);
+  lg->GetMakefile()->SetStartDirectory(targetDirectory);
+  gg->SetCurrentLocalGenerator(lg);
+
+  return gg;
+}
+
 bool cmQtAutoGenerators::Run(const char* targetDirectory, const char *config)
 {
   bool success = true;
   cmake cm;
-  cmGlobalGenerator* gg = this->CreateGlobalGenerator(&cm, targetDirectory);
+  cmGlobalGenerator* gg = CreateGlobalGenerator(&cm, targetDirectory);
   cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile();
 
   this->ReadAutogenInfoFile(makefile, targetDirectory, config);
@@ -985,24 +1010,6 @@ bool cmQtAutoGenerators::Run(const char* targetDirectory, const char *config)
   return success;
 }
 
-
-cmGlobalGenerator* cmQtAutoGenerators::CreateGlobalGenerator(cmake* cm,
-                                                  const char* targetDirectory)
-{
-  cmGlobalGenerator* gg = new cmGlobalGenerator();
-  gg->SetCMakeInstance(cm);
-
-  cmLocalGenerator* lg = gg->CreateLocalGenerator();
-  lg->GetMakefile()->SetHomeOutputDirectory(targetDirectory);
-  lg->GetMakefile()->SetStartOutputDirectory(targetDirectory);
-  lg->GetMakefile()->SetHomeDirectory(targetDirectory);
-  lg->GetMakefile()->SetStartDirectory(targetDirectory);
-  gg->SetCurrentLocalGenerator(lg);
-
-  return gg;
-}
-
-
 bool cmQtAutoGenerators::ReadAutogenInfoFile(cmMakefile* makefile,
                                       const char* targetDirectory,
                                       const char *config)
@@ -1424,7 +1431,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
   if (!automocCppChanged)
     {
     // compare contents of the _automoc.cpp file
-    const std::string oldContents = this->ReadAll(this->OutMocCppFilename);
+    const std::string oldContents = ReadAll(this->OutMocCppFilename);
     if (oldContents == automocSource)
       {
       // nothing changed: don't touch the _automoc.cpp file
@@ -1452,7 +1459,7 @@ void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename,
               "[\n][ \t]*#[ \t]*include[ \t]+"
               "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]");
 
-  const std::string contentsString = this->ReadAll(absFilename);
+  const std::string contentsString = ReadAll(absFilename);
   if (contentsString.empty())
     {
     std::cerr << "AUTOGEN: warning: " << absFilename << ": file is empty\n"
@@ -1635,7 +1642,7 @@ void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename,
               "[\n][ \t]*#[ \t]*include[ \t]+"
               "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]");
 
-  const std::string contentsString = this->ReadAll(absFilename);
+  const std::string contentsString = ReadAll(absFilename);
   if (contentsString.empty())
     {
     std::cerr << "AUTOGEN: warning: " << absFilename << ": file is empty\n"
@@ -1748,7 +1755,7 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
     {
     return;
     }
-  const std::string contentsString = this->ReadAll(absFilename);
+  const std::string contentsString = ReadAll(absFilename);
   if (contentsString.empty())
     {
     std::cerr << "AUTOGEN: warning: " << absFilename << ": file is empty\n"
@@ -1843,7 +1850,7 @@ void cmQtAutoGenerators::ParseHeaders(const std::set<std::string>& absHeaders,
       ++hIt)
     {
     const std::string& headerName = *hIt;
-    const std::string contents = this->ReadAll(headerName);
+    const std::string contents = ReadAll(headerName);
 
     if (includedMocs.find(headerName) == includedMocs.end())
       {
@@ -2122,13 +2129,3 @@ bool cmQtAutoGenerators::EndsWith(const std::string& str,
     }
   return (str.substr(str.length() - with.length(), with.length()) == with);
 }
-
-
-std::string cmQtAutoGenerators::ReadAll(const std::string& filename)
-{
-  cmsys::ifstream file(filename.c_str());
-  cmsys_ios::stringstream stream;
-  stream << file.rdbuf();
-  file.close();
-  return stream.str();
-}
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 80123d8..ac0fd9e 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -36,9 +36,6 @@ private:
   void InitializeAutoRccTarget(cmTarget* target);
   void SetupAutoRccTarget(cmTarget const* target);
 
-  cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
-                                           const char* targetDirectory);
-
   bool ReadAutogenInfoFile(cmMakefile* makefile,
                            const char* targetDirectory,
                            const char *config);
@@ -82,7 +79,6 @@ private:
   std::string Join(const std::vector<std::string>& lst, char separator);
   bool EndsWith(const std::string& str, const std::string& with);
   bool StartsWith(const std::string& str, const std::string& with);
-  std::string ReadAll(const std::string& filename);
 
   void MergeUicOptions(std::vector<std::string> &opts,
                        const std::vector<std::string> &fileOpts, bool isQt5);

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

Summary of changes:
 Source/cmQtAutoGenerators.cxx |   65 ++++++++++++++++++++---------------------
 Source/cmQtAutoGenerators.h   |    4 ---
 2 files changed, 31 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list