diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-06-14 20:27:22 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2012-06-14 20:27:22 (GMT) |
commit | e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084 (patch) | |
tree | 96dfa2109bfd24375db18647f787f7c410039df5 /Source/cmQtAutomoc.cxx | |
parent | 7717d964b86f86e001641d1afea84c327e336ee7 (diff) | |
download | CMake-e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084.zip CMake-e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084.tar.gz CMake-e4a2d5f9eeca03470192f0f0b4e3bc16ef33e084.tar.bz2 |
automoc: better error handling (#13299)
automoc now fails immediately if moc fails, instead of continuing
and letting the build fail later on.
Alex
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r-- | Source/cmQtAutomoc.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
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(); |