MantisBT - CMake
View Issue Details
0012541CMakeCMakepublic2011-10-26 16:492011-12-16 17:22
Jason Haslam 
Alex Neundorf 
normalminorN/A
closedfixed 
CMake 2.8.6 
CMake 2.8.7CMake 2.8.7 
0012541: Missing option to pass flags to moc for AUTOMOC targets
The qt4_wrap_cpp() macro has an optional OPTIONS flag to allow passing extra flags to moc. The new AUTOMOC property seems to be missing equivalent functionality. Suggest adding a new AUTOMOC_OPTIONS or AUTOMOC_FLAGS (or similar) property for this purpose.
No tags attached.
Issue History
2011-10-26 16:49Jason HaslamNew Issue
2011-10-26 16:50Alex NeundorfAssigned To => Alex Neundorf
2011-10-26 16:50Alex NeundorfStatusnew => assigned
2011-11-01 09:39Alex NeundorfNote Added: 0027695
2011-11-01 12:36Jason HaslamNote Added: 0027703
2011-11-01 16:40Alex NeundorfNote Added: 0027704
2011-11-01 16:40Alex NeundorfStatusassigned => closed
2011-11-01 16:40Alex NeundorfResolutionopen => fixed
2011-12-16 17:22David ColeFixed in Version => CMake 2.8.7
2011-12-16 17:22David ColeTarget Version => CMake 2.8.7

Notes
(0027695)
Alex Neundorf   
2011-11-01 09:39   
Can you please try the AddMocOptionsToAutomoc branch on cmake stage ?
http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/AddMocOptionsToAutomoc [^]

It has a new target property AUTOMOC_MOC_OPTIONS, which you can use to give extra options to moc.
This target property is initialized from the CMAKE_AUTOMOC_MOC_OPTIONS variable.

Please let me know whether this works for you.
(0027703)
Jason Haslam   
2011-11-01 12:36   
Yes, it works fine for our use case. Thanks for adding this!
(0027704)
Alex Neundorf   
2011-11-01 16:40   
I merged it into next, should be in 2.8.7.