[cmake-developers] A few more changes to automoc before 2.8.7
Alexander Neundorf
neundorf at kde.org
Mon Dec 19 16:10:15 EST 2011
On Sunday 18 December 2011, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> > On Sunday 18 December 2011, Alexander Neundorf wrote:
> >> On Friday 16 December 2011, Stephen Kelly wrote:
> >> > Alexander Neundorf wrote:
> >> > > On Thursday 15 December 2011, Stephen Kelly wrote:
> >> > >> Alexander Neundorf wrote:
> >> > >> >> And, again a question regarding wording, currently the warnings
> >> > >> >> generated by automoc say "Better <do this and that> for a more
> >> > >> >> robust build." I'd like to have a better way to express it.
> >> > >> >> "Use <this and that> for STRICT mode compatibility." ?
> >> > >> >> or "for qmake compatibility" ?
> >> > >> >> Better ideas ?
> >> > >> >
> >> > >> > I pushed it as branch AutomocFineTuning to stage.
> >> > >> > The variable is now CMAKE_AUTOMOC_RELAXED_MODE .
> >> > >> >
> >> > >> > If that's fine with everybody, I'll merge it into next in the
> >> > >> > next days. This should still go into 2.8.7.
> >> > >>
> >> > >> I applied the attached patch and kdelibs build fails using the
> >> > >> AutomocFineTuning branch (as expected).
> >> > >
> >> > > You mean setting CMAKE_AUTOMOC_RELAXED_MODE to TRUE, right ?
> >> > > Yes, that's expected.
> >> >
> >> > I mean not setting it at all and letting it take its default value of
> >> > True.
> >>
> >> Do you mean the relaxed mode should be default ?
> >> Why ? In strict mode it behaves exactly as documented.
> >> For KDE it shouldn't be a problemit's just that one variable which has
> >> to be set.
> >>
> >> > >> Uncommenting the line to invert the relaxed mode makes it build
> >> > >> again. I'm fine with the change.
> >> > >>
> >> > >> However, the warnings/errors output by cmake don't include a
> >> > >> reference to CMAKE_AUTOMOC_RELAXED_MODE (as that is not referenced
> >> > >> in all error/warning cases).
> >> > >
> >> > > Do you have commit e474dcb23197489640456b4 already ?
>
> http://cmake.org/gitweb?p=stage/cmake.git;a=commit;h=e474dcb2319748964045
>
> >> > 6b 46862a5aa7019834a5
> >> >
> >> > > I committed this Wednesday evening and though I had inserted it in
> >> > > all places where it makes sense.
> >> >
> >> > Yes, I have this commit already. It might make sense to put the
> >> > message in the other places.
> >>
> >> I'll have a look.
> >
> > I had a look.
>
> Did you try a build? Even with the early return() so that it's done very
> quickly?
>
> > From my POV they look good as they are.
> > Where would you like to have additional mentions of
> > CMAKE_AUTOMOC_RELAXED_MODE, and what should they actually say ?
>
> I think it was about _p moc files.
"Scanning dependencies of target solid_automoc
[ 0%] Automoc for target solid
AUTOMOC: error: /home/alex/src/CMake/tests/solid.orig/solid/solid/device.cpp:
The file includes the moc file "device_p.moc", which seems to be the moc file
from a different source file. This is not supported. Include "device.moc" to
run moc on this source file."
Looks good IMO for strict mode.
In relaxed mode it says:
"[ 0%] Automoc for target solid
AUTOMOC: warning:
/home/alex/src/CMake/tests/solid.orig/solid/solid/device.cpp: The file
includes the moc file "device_p.moc" instead of "moc_device_p.cpp". Running
moc on "/home/alex/src/CMake/tests/solid.orig/solid/solid/device_p.h" !
Include "moc_device_p.cpp" for compatiblity with strict mode (see
CMAKE_AUTOMOC_RELAXED_MODE)."
How would you like to have that changed ?
Alex
More information about the cmake-developers
mailing list