[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1637-ga5e52f0

Stephen Kelly steveire at gmail.com
Mon Mar 31 10:21:53 EDT 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  a5e52f0b76ff4867f4cecee63382128c89adad21 (commit)
       via  200221232936eb3a7229cb1a064a1a16fee92282 (commit)
      from  2d81b243ed302815fed17161e4d2c6b6cb4a7fab (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=a5e52f0b76ff4867f4cecee63382128c89adad21
commit a5e52f0b76ff4867f4cecee63382128c89adad21
Merge: 2d81b24 2002212
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 10:21:52 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 31 10:21:52 2014 -0400

    Merge topic 'automoc-windows-command-limit' into next
    
    20022123 Revert "QtAutogen: Use an at-file for very long command on Windows."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=200221232936eb3a7229cb1a064a1a16fee92282
commit 200221232936eb3a7229cb1a064a1a16fee92282
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 16:21:30 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Mar 31 16:21:30 2014 +0200

    Revert "QtAutogen: Use an at-file for very long command on Windows."
    
    This reverts commit 587451858f73d7585e1280de16f9d07f566fd267.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 426cfea..a6e6af7 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -994,7 +994,7 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
 
   if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
     {
-    success = this->RunAutogen(makefile, targetDirectory);
+    success = this->RunAutogen(makefile);
     }
 
   this->WriteOldMocDefinitionsFile(targetDirectory);
@@ -1273,8 +1273,7 @@ void cmQtAutoGenerators::Init()
 }
 
 
-bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile,
-                                    const std::string& targetDirectory)
+bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
 {
   if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str())
     || (this->OldCompileSettingsStr != this->CurrentCompileSettingsStr))
@@ -1371,7 +1370,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile,
       it != includedMocs.end();
       ++it)
     {
-    this->GenerateMoc(it->first, it->second, targetDirectory);
+    this->GenerateMoc(it->first, it->second);
     }
   for(std::map<std::string, std::string>::const_iterator
       it = includedUis.begin();
@@ -1403,8 +1402,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile,
         it != notIncludedMocs.end();
         ++it)
       {
-      bool mocSuccess = this->GenerateMoc(it->first, it->second,
-                                          targetDirectory);
+      bool mocSuccess = this->GenerateMoc(it->first, it->second);
       if (mocSuccess)
         {
         automocCppChanged = true;
@@ -1892,12 +1890,8 @@ void cmQtAutoGenerators::ParseHeaders(const std::set<std::string>& absHeaders,
 }
 
 bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
-                              const std::string& mocFileName,
-                              const std::string& targetDirectory)
+                              const std::string& mocFileName)
 {
-#ifndef _WIN32
-  (void)targetDirectory;
-#endif
   const std::string mocFilePath = this->Builddir + mocFileName;
   int sourceNewerThanMoc = 0;
   bool success = cmsys::SystemTools::FileTimeCompare(sourceFile.c_str(),
@@ -1920,66 +1914,25 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
 
     std::vector<std::string> command;
     command.push_back(this->MocExecutable);
-#ifdef _WIN32
-  std::string::size_type commandLength = 0;
-#endif
     for (std::list<std::string>::const_iterator it = this->MocIncludes.begin();
          it != this->MocIncludes.end();
          ++it)
       {
       command.push_back(*it);
-#ifdef _WIN32
-      commandLength += it->size() + 3;
-#endif
       }
     for(std::list<std::string>::const_iterator it=this->MocDefinitions.begin();
         it != this->MocDefinitions.end();
         ++it)
       {
       command.push_back(*it);
-#ifdef _WIN32
-      commandLength += it->size() + 3;
-#endif
       }
     for(std::vector<std::string>::const_iterator it=this->MocOptions.begin();
         it != this->MocOptions.end();
         ++it)
       {
       command.push_back(*it);
-#ifdef _WIN32
-      commandLength += it->size() + 3;
-#endif
       }
 #ifdef _WIN32
-    commandLength += mocFilePath.size() + 3;
-    commandLength += sourceFile.size() + 3;
-    if(commandLength > 32000)
-      {
-      // Windows command line length limit is 2**15. If it's really long,
-      // just put it in a @-file.
-      std::string atfilename(
-          cmSystemTools::CollapseFullPath(targetDirectory.c_str()));
-      cmSystemTools::ConvertToUnixSlashes(atfilename);
-      atfilename += "/moc_parameters";
-
-      std::fstream atfile;
-      atfile.open(atfilename.c_str(),
-                  std::ios::out | std::ios::trunc);
-      for (std::vector<std::string>::const_iterator it = command.begin() + 1;
-          it != command.end(); ++it)
-        {
-        atfile << *it << "\n";
-        }
-
-      command.clear();
-      command.push_back(this->MocExecutable);
-      command.push_back("@" + atfilename);
-
-      atfile.close();
-      }
-#endif
-
-#ifdef _WIN32
     command.push_back("-DWIN32");
 #endif
     command.push_back("-o");
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 40283a8..8003795 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -45,10 +45,9 @@ private:
 
   std::string MakeCompileSettingsString(cmMakefile* makefile);
 
-  bool RunAutogen(cmMakefile* makefile, const std::string& targetDirectory);
+  bool RunAutogen(cmMakefile* makefile);
   bool GenerateMoc(const std::string& sourceFile,
-                   const std::string& mocFileName,
-                   const std::string& targetDirectory);
+                   const std::string& mocFileName);
   bool GenerateUi(const std::string& realName, const std::string& uiFileName);
   bool GenerateQrc();
   void ParseCppFile(const std::string& absFilename,

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

Summary of changes:
 Source/cmQtAutoGenerators.cxx |   57 ++++-------------------------------------
 Source/cmQtAutoGenerators.h   |    5 ++--
 2 files changed, 7 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list