View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012533 | CMake | CMake | public | 2011-10-21 22:07 | 2011-10-22 14:31 | ||||
Reporter | Jason Haslam | ||||||||
Assigned To | Alex Neundorf | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Mac OS X Lion | OS | OS Version | ||||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0012533: AUTOMOC property doesn't moc header when the source file #includes *.moc | ||||||||
Description | Given the following: A.h: class A { Q_OBJECT } A.cpp: #include "A.h" class B { Q_OBJECT } ... #include "A.moc" The new AUTOMOC property correctly generates A.moc for class B defined in the source file, but fails to generate moc_A.cpp (and #include it in target_automoc.cpp) for class A defined in the header. I can force moc to run on the header by #including moc_A.cpp as well. IMHO the header should be scanned for classes containing Q_OBJECT even if the source file #includes *.moc. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0027618) Alex Neundorf (developer) 2011-10-22 12:07 |
I see. It only automatically scans the header file if it has found neither a *.moc nor a moc_*.cpp include. |
(0027619) Alex Neundorf (developer) 2011-10-22 12:10 |
Does adding the A.h to the list of source files for the target also make it work for you ? (without inserting an #include "moc_A.cpp" into A.cpp) Alex |
(0027620) Alex Neundorf (developer) 2011-10-22 13:47 |
This should be working now in the AutomocFindQ_OBJECTAlwaysInHeader branch on cmake stage, and I also already merged it into cmake next. I also extended the automoc test to test for this case. |
(0027621) Jason Haslam (reporter) 2011-10-22 14:07 |
Yes, adding the header file to the list of source files works. That's a better workaround. Thanks for addressing this so quickly! |
(0027622) Jason Haslam (reporter) 2011-10-22 14:11 |
Ugh, didn't really mean to reopen this bug. I just wanted to add a note. I guess I'm not allowed to close it now. Sorry about that. |
(0027624) Alex Neundorf (developer) 2011-10-22 14:31 |
Yes, adding notes is only possible after reopening. No problem. Alex |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-10-21 22:07 | Jason Haslam | New Issue | |
2011-10-22 11:08 | Alex Neundorf | Assigned To | => Alex Neundorf |
2011-10-22 11:08 | Alex Neundorf | Status | new => assigned |
2011-10-22 12:07 | Alex Neundorf | Note Added: 0027618 | |
2011-10-22 12:10 | Alex Neundorf | Note Added: 0027619 | |
2011-10-22 13:47 | Alex Neundorf | Note Added: 0027620 | |
2011-10-22 13:47 | Alex Neundorf | Status | assigned => closed |
2011-10-22 13:47 | Alex Neundorf | Resolution | open => fixed |
2011-10-22 14:07 | Jason Haslam | Note Added: 0027621 | |
2011-10-22 14:07 | Jason Haslam | Status | closed => feedback |
2011-10-22 14:07 | Jason Haslam | Resolution | fixed => reopened |
2011-10-22 14:11 | Jason Haslam | Note Added: 0027622 | |
2011-10-22 14:11 | Jason Haslam | Status | feedback => assigned |
2011-10-22 14:31 | Alex Neundorf | Note Added: 0027624 | |
2011-10-22 14:31 | Alex Neundorf | Status | assigned => closed |
2011-10-22 14:31 | Alex Neundorf | Resolution | reopened => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |