Coding style questions

Alexander Neundorf neundorf at kde.org
Sat Sep 17 12:16:02 UTC 2011


On Saturday, September 17, 2011 01:54:49 PM Alexander Neundorf wrote:
> On Saturday, September 17, 2011 11:32:04 AM Yury G. Kudryashov wrote:
> > Hi!
> > 
> > A few questions on coding style. I just wonder how strict are our
> > policies.
> > 
> > 1. Is there any policy whether to export MyPackage_INCLUDE_DIRS or
> > MYPACKAGE_INCLUDE_DIRS in:
> > * FindMyPackage.cmake;
> > * FindMYPACKAGE.cmake.
> > 
> > It seems that cmake/Modules/readme.txt suggests using
> > MyPackage_INCLUDE_DIRS for FindMyPackage and MYPACKAGE_INCLUDE_DIRS for
> > FindMYPACKAGE, but many Find-modules in cmake do not follow this
> > convention.
> 
> One year ago or so there was a lengthy discussion about this on the cmake-
> developers list, including numbers of how many modules do what.
> There are three groups:
> ExactCase
> UPPERCASE
> UNDECIDED
> 
> The UNDECIDED group where those files where the filename is already
> FindBOTH.cmake, i.e. where the package name is already uppercase, so it
> could count as both.
> If the BOTH files were counted as ExactCase, it was about 50/50 in CMake
> itself.
> If BOTH files were counted as UPPERCASE, it was more like 80/20 for
> UPPERCASE in CMake itself.
> For the files in KDE it was more like 90/10 for UPPERCASE.
> 
> For that reason, I'm for staying with UPPERCASE, since this is what the big
> majority of existing files is using.

... which leads to the question, how to name the Find-module.
FindSomePackage, FindSOMEPACKAGE or FindJustAsThePackageDoes.
Probably the last one, i.e. check how the project calls itself and use the 
same casing fore the Find-module.

Alex


More information about the Kde-buildsystem mailing list