[Cmake-commits] CMake branch, next, updated. v2.8.8-3173-g7343e73

Alexander Neundorf neundorf at kde.org
Thu Jun 14 16:29:40 EDT 2012


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  7343e73937f37dda1de42d84b247f528dfca75b3 (commit)
       via  e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084 (commit)
       via  7717d964b86f86e001641d1afea84c327e336ee7 (commit)
      from  a885c0574474456fd1b1ef93d2bfd3b33176470f (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=7343e73937f37dda1de42d84b247f528dfca75b3
commit 7343e73937f37dda1de42d84b247f528dfca75b3
Merge: a885c05 e4a2d5f
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Thu Jun 14 16:29:39 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 14 16:29:39 2012 -0400

    Merge topic 'FailIfMocFails-13299' into next
    
    e4a2d5f automoc: better error handling (#13299)
    7717d96 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084
commit e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jun 14 22:27:22 2012 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Jun 14 22:27:22 2012 +0200

    automoc: better error handling (#13299)
    
    automoc now fails immediately if moc fails, instead of continuing
    and letting the build fail later on.
    
    Alex

diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 113d678..65ecdf7 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -245,6 +245,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
 
 bool cmQtAutomoc::Run(const char* targetDirectory)
 {
+  bool success = true;
   cmake cm;
   cmGlobalGenerator* gg = this->CreateGlobalGenerator(&cm, targetDirectory);
   cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile();
@@ -256,7 +257,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
 
   if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
     {
-    this->RunAutomoc();
+    success = this->RunAutomoc();
     }
 
   this->WriteOldMocDefinitionsFile(targetDirectory);
@@ -264,7 +265,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
   delete gg;
   gg = NULL;
   makefile = NULL;
-  return true;
+  return success;
 }
 
 
@@ -578,7 +579,7 @@ bool cmQtAutomoc::RunAutomoc()
 
   if (this->RunMocFailed)
     {
-    std::cerr << "returning failed.."<< std::endl;
+    std::cerr << "moc failed..."<< std::endl;
     return false;
     }
   outStream.flush();
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2ffff42..451aec8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1699,8 +1699,8 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
     else if (args[1] == "cmake_automoc")
       {
         cmQtAutomoc automoc;
-        automoc.Run(args[2].c_str());
-        return 0;
+        bool automocSuccess = automoc.Run(args[2].c_str());
+        return automocSuccess ? 0 : 1;
       }
 #endif
 

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

Summary of changes:
 Source/CMakeVersion.cmake |    2 +-
 Source/cmQtAutomoc.cxx    |    7 ++++---
 Source/cmake.cxx          |    4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list