[CMake] Upper or lower case for package variables in FindXXX.cmake files?

Philip Lowman philip at yhbt.com
Sun Mar 1 18:06:26 EST 2009


On Sun, Mar 1, 2009 at 3:55 PM, Alexander Neundorf
<a.neundorf-work at gmx.net>wrote:

> On Friday 27 February 2009, Philip Lowman wrote:
> > On Fri, Feb 27, 2009 at 1:13 PM, Matt Williams <lists at milliams.com>
> wrote:
> ...
> > > There is no indication in the readme.txt which is preferred though I
> have
> > > been
> > > assuming the mixed case version. Based on bits and pieces I guess I am
> > > right
> > > (for example,the "DOXYGEN_FIND_QUIETLY, but it should have been
> > > Doxygen_FIND_QUIETLY" comment in FindDoxygen.cmake).
> >
> > I have wondered the same thing for many a moon.
> >
> > The arguments to find_package, i.e. EXACT, QUIET, COMPONENTS, version
> > number, etc. cause variables such as Doxygen_FIND_QUIETLY,
> > Boost_COMPONENTS, and OpenSceneGraph_FIND_VERSION to be generated by
> CMake.
> >  These are based directly off of the name of the find module filename so
> > they will generally appear to be mixed case if that is the name of the
> > module.
> >
> > Macros like FindPackageHandleStandardArgs seem to make everything upper
> > case (i.e DOXYGEN_FOUND, OPENSCENEGRAPH_FOUND, etc.).
> >
> > Not sure what the answer is.  It's almost as if input variables are
> > encouraged to be the case of the module and output variables are
> encouraged
> > to be uppercase always.
>
> Currently it is like this:
> the variables which are set in a module, are all-upper case. The variables
> provided by cmake to the module, are exact-case.
> The issue with changing the recommendation to use exact-case for everything
> is
> that most early cmake modules used all-upper-case, and so to stay
> consistent
> we should keep it like this for variables defined by modules.


Can this be added to Modules/readme.txt?

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090301/ecda34f5/attachment.htm>


More information about the CMake mailing list