KDE/kdelibs/cmake/modules

David Faure faure at kde.org
Tue Mar 10 00:16:52 CET 2009


On Monday 09 March 2009, Alexander Neundorf wrote:
> On Wednesday 04 March 2009, David Faure wrote:
> > SVN commit 935251 by dfaure:
> >
> > Support for .kcfg files being generated using configure_file like tmcguire
> > wants to do in kmail.
> > CCMAIL: kde-buildsystem at kde.org
> >
> >
> >  M  +10 -2     KDE4Macros.cmake
> >
> >
> > --- trunk/KDE/kdelibs/cmake/modules/KDE4Macros.cmake #935250:935251
> > @@ -70,13 +70,21 @@
> >         set(_src_FILE    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
> >         set(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
> >         set(_moc_FILE    ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
> > +       set(_kcfg_PATH   ${_abs_PATH}/${_kcfg_FILE})
> 
> I think this variable should end with "_FILE", not with "_PATH", since in this 
> macro all other variables which end in "_PATH" are only a directory, while 
> all other variables which are a file end in "_FILE".

This is true. However _kcfg_FILE was confusing because it was "just a filename"
while the other _FILE variables were "path+filename".
I always find this confusing in cmake code, it's never clear what is relative
and what is absolute. I do agree that some sort of naming convention
would be great, but what you're suggesting is to use _FILE for both
absolute and relative... :-)

(I'm used to PATH including the filename because of KUrl :-)

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list