diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-15 19:47:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-21 15:12:52 (GMT) |
commit | 5308f954c9ad13cfc6cc84f1f1255fb5faff48c6 (patch) | |
tree | 5432f1a3dc7c8eef1b7e908abd8e0f1d38c53d70 /Source/cmQtAutoGenerators.cxx | |
parent | 887e40034161589b63fdb14bfaee7f66374b9b83 (diff) | |
download | CMake-5308f954c9ad13cfc6cc84f1f1255fb5faff48c6.zip CMake-5308f954c9ad13cfc6cc84f1f1255fb5faff48c6.tar.gz CMake-5308f954c9ad13cfc6cc84f1f1255fb5faff48c6.tar.bz2 |
Autogen: Issue a warning if moc isn't required in strict mode
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 859b2de..4e4ab30 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -857,6 +857,15 @@ bool cmQtAutoGenerators::ParseContentForMoc( // Include self fileToMoc = absFilename; ownDotMocIncluded = true; + // Accept but issue a warning if moc isn't required + if (!requiresMoc) { + std::ostringstream err; + err << "AutoMoc: Error: " << absFilename << "\n" + << "The file includes the moc file \"" << incString << "\"" + << ", but does not contain a Q_OBJECT or Q_GADGET " + "macro.\n"; + this->LogWarning(err.str()); + } } else { // Don't allow FOO.moc include other than self in strict mode std::ostringstream err; |