On Sunday 11 December 2011, Alexander Neundorf wrote: > Hi, > > in current CMake HEAD automoc has two modes: strict and not strict. > > In strict mode it is behaves exactly how the documentation says: > "If an #include statement like #include "moc_foo.cpp" is found, the > Q_OBJECT class declaration is expected in the header, and moc is run on > the header file. > If an #include statement like #include "foo.moc" is found, then a Q_OBJECT > is expected in the current source file and moc is run on the file itself." > > In non-strict mode it accepts more, which makes it kdelibs4-compatible. > > The strict mode should be qmake-compatible AFAIK. > > Currently, if Qt4 is detected CMAKE_AUTOMOC_STRICT_MODE is initialized to > FALSE, if Qt5 is detected it is initialized to TRUE. > > I'd like to change that so that it is always initialized to TRUE, so > everybody gets strict mode by default (which is easier to understand). > > Then, if STRICT mode is default, I'm thinking about inverting the variable, > i.e. from CMAKE_AUTOMOC_STRICT_MODE to CMAKE_AUTOMOC_RELAXED_MODE or > something. This way the other non-standard mode would be enabled by setting > a variable to TRUE instead to FALSE, which would be better IMO. > Makes sense ? > > And I would need a better name than "CMAKE_AUTOMOC_RELAXED_MODE", > FORGIVING, LOOSE, better ideas ? > > 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. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
