[CMake] Variable naming when writing FindXXX.cmake files

Andreas Pakulat apaku at gmx.de
Thu Nov 13 20:02:41 EST 2008


On 13.11.08 21:16:37, Alexander Neundorf wrote:
> On Thursday 13 November 2008, Judicaël Bedouet wrote:
> > Hello,
> >
> > I have read the README file provided in directory cmake-2.6/Modules.
> >
> > I would just like to clarify a point : the names of the variables must
> > always be uppercased even if the name of the package contains
> > lowercase and uppercase letters, must'nt they ?
> >
> > For example, if I wrote a FindXalanC.cmake, I would export variables
> > XALANC_INCLUDE_DIRS, XALANC_LIBRARIES... to respect naming convention
> > and not XalanC_INCLUDE_DIRS, XalanC_LIBRARIES. Am I right ?
> 
> Yes.
> Rationale: all "early" modules shipped with cmake do it this way.

Interesting, then why does the (relatively new) FindBoost.cmake module not
follow this? It uses all-uppercase for environment and cmake variables
(given on the commandline) but uses mixed case for all variables it
"exports". I recall that there were specific changes to make it this way,
so now I'm confused??

Andreas

-- 
You will gain money by an immoral action.


More information about the CMake mailing list