Fancy header policy

Benjamin Port benjamin.port at ben2367.fr
Tue Jul 23 08:05:59 UTC 2013


On Tuesday, July 23, 2013 08:49:48 AM Kevin Ottens wrote:
> Hello,
> 
> On Saturday 20 July 2013 03:12:25 Vishesh Handa wrote:
> > I've been looking at the frameworks branch and I cannot help but
> > notice that there is an 'include' folder which contains all the fancy
> > headers. Is there any policy on what needs to be done about it?
> > 
> > Some of the fancy headers, such as the Nepomuk ones, should just be
> > discarded.
> > 
> > Should the others be moved to their respective frameworks in a special
> > include folder? So 'include/Solid/*' would move to
> > 'tier1/solid/includes/' ?
> 
> The ideal situation would be to get them generated, but I don't think anyone
> put the work in yet.
Yes, I think we need to find a way to generate fancy header. But we probably 
need to have somewhere the header associated with the forwarding header name. 
We can't generate a CamelCase name.
I'm not a cmake expert but we probably can do something like:
list (APPEND myframework_HEADER file1.h)
list (APPEND myframework_FORWARDING File1)

list (APPEND myframework_HEADER file2.h)
list (APPEND myframework_FORWARDING File2)

or we can do something like that:
set(myframework_HEADER
    file1.h
    file2.h
)

set(myframework_FORWARDING
    File1
    File2
)

But the second way is not really  an easy way to know which file is associated 
with which file

and then install myframework_HEADER
install(FILES ${myframework_HEADER} ...]

and install forwarding header
list(LENGTH myframework_HEADER count)
math(EXPR count "${count}-1")
foreach(i RANGE ${count})
  list(GET myframework_HEADER ${i} header)
  list(GET myframework_FORWARDING ${i} forwarding)
  file(WRITE ${forwarding} "#include \"${forwarding}\"\n")
endforeach()

File write is not correct because I don't use good directory.

I used this discussion: http://www.cmake.org/pipermail/cmake/2012-July/051336.html (thanks Alex)

> 
> > Also, under what folder name should there includes be installed?
> > Currently the fancy includes are installed in a KDE folder
> > (/include/KDE/fancyHeaders). Do we want to continue with that? Or just
> > install them in the specific folder. Eg - Solid headers would now be
> > installed in include/Solid/ instead of include/KDE/Solid/
> 
> I see no problem having them still installed in a KDE folder. Maybe we want
> that to become KF5 though to help with co-installation of major versions.
> 
IMO we need to have subdirectory because we can't be sure that we don't have 2 
headers with the same name in 2 differents frameworks.

> Regards.

--
Benjamin Port


More information about the Kde-frameworks-devel mailing list