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 dd2f604b30aa9fb31aa7e61e55ce386b534f8ceb (commit) via 72bb058e92167a272b40b4b710fc2fe41b1fc8fe (commit) from df195851e52948ca19019179718d08f68354daf9 (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=dd2f604b30aa9fb31aa7e61e55ce386b534f8ceb commit dd2f604b30aa9fb31aa7e61e55ce386b534f8ceb Merge: df19585 72bb058 Author: Alexander Neundorf <neund...@kde.org> AuthorDate: Wed Nov 16 16:42:02 2011 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Nov 16 16:42:02 2011 -0500 Merge topic 'AutomocIncludedDotMocFileHandling' into next 72bb058 Automoc: modified handling of included .moc files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72bb058e92167a272b40b4b710fc2fe41b1fc8fe commit 72bb058e92167a272b40b4b710fc2fe41b1fc8fe Author: Alex Neundorf <neund...@kde.org> AuthorDate: Wed Nov 16 22:35:06 2011 +0100 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Wed Nov 16 22:35:06 2011 +0100 Automoc: modified handling of included .moc files -enable the KDE4-compatiblity mode only when using Qt4 -always (except in the KDE4 compat mode) error out if a cpp-file contains "Q_OBJECT", but does not include filename.moc Alex diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 3d92a59..ad11668 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -652,13 +652,15 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, // If this is the case, the moc_foo.cpp should probably be generated from // foo.cpp instead of foo.h, because otherwise it won't build. // But warn, since this is not how it is supposed to be used. - if ((dotMocIncluded == false) && (mocUnderscoreIncluded == true)) + if ((dotMocIncluded == false) && (containsQ_OBJECT(contentsString))) { - if (containsQ_OBJECT(contentsString)) + if ((this->QtMajorVersion == "4") && (mocUnderscoreIncluded == true)) { + // this is for KDE4 compatibility: std::cerr << "AUTOMOC: warning: " << absFilename << ": The file " << "contains a Q_OBJECT macro, but does not include " - << "\"" << scannedFileBasename << ".moc\", but instead includes " + << "\"" << scannedFileBasename << ".moc\", but instead " + "includes " << "\"" << ownMocUnderscoreFile << "\". Running moc on " << "\"" << absFilename << "\" ! Better include \"" << scannedFileBasename << ".moc\" for a robust build." @@ -666,6 +668,15 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, includedMocs[absFilename] = ownMocUnderscoreFile; includedMocs.erase(ownMocHeaderFile); } + else + { + // otherwise always error out since it will not compile: + std::cerr << "AUTOMOC: error: " << absFilename << ": The file " + << "contains a Q_OBJECT macro, but does not include " + << "\"" << scannedFileBasename << ".moc\" !" + << std::endl; + ::exit(EXIT_FAILURE); + } } // search for header files and private header files we may need to moc: ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutomoc.cxx | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits