[CMake] module variable naming conventions

a.neundorf-work at gmx.net a.neundorf-work at gmx.net
Thu Apr 12 13:11:07 EDT 2007


On Thursday 12 April 2007 02:11, Bob Kuehne wrote:
> hi, i've been using cmake for a while now, and am writing some of my
> own modules to find packages, in particular. i was using my own
> naming convention for return INCLUDE and LIB paths, something like
> FOO_INCLUDE_DIR and FOO_LIBRARY_DIR, until i read the module readme:
>
>   /usr/share/cmake-2.4/Modules/readme.txt
>
> it pretty clearly states that i should return things that are plural,
> like:
>
>   FOO_LIBRARY_DIRS
>   FOO_INCLUDE_DIRS
>   FOO_LIBRARIES
>
> however quite a number of the Find*.cmake that exist in the
> distribution use different syntax, returning mixed singular and
> plural forms (FindJPEG), _PATH instead of _DIR for returned INCLUDES
> (FindPythonLibs), and many other combinations.
>
> my question (you knew i had one, right?) is simply this:
>
>   - what is the best practice / standard for nomenclature? contents
> of 'readme.txt'?

Yes.

>   - is it worth fixing up old versions to the standard?

They should keep the old variable names for compatibility, and also offer the 
standard conforming names I'd say.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the CMake mailing list