[CMake] FindXXX.cmake specification inconsistency

Bill Hoffman bill.hoffman at kitware.com
Sat Apr 21 12:50:11 EDT 2007


r.koebler at yahoo.de wrote:
> hi,
>
> currently, I know 3 different specifications, how FindXXX.cmake files
> should look like:
> - the shipped modules in /usr/share/cmake-2.4/Modules/
> - the readme.txt in      /usr/share/cmake-2.4/Modules/
> - CMake_HowToFindInstalledSoftware.html in the wiki
>
> unfortunately, these specifications are inconsistent! and the
> sentence "We would like all FindXXX.cmake files to produce consistent
> variable names." in the readme.txt is currently really ridiculous...
>   
The readme is the way it is supposed to be.   However, many of the 
modules were created before the readme was created.   Due to two 
factors, backwards compatibility and a lack of time to make the Find* 
stuff more consistent it is not.   New modules should follow the 
readme.  If you have the time, you are welcome to update all of the 
other modules to meet the specs.   However, the old variables need to be 
kept as well as the new ones that match the readme.txt so that we don't 
break any existing projects.   I will change the readme to note this 
problem to avoid confusion in the future.  At some point, I am sure it 
will all be cleaned up, but unless someone steps up to the plate, there 
are other more structural things that will be done in cmake first.  The 
individual models should be documented, and --help-module FindXXX will 
give you the specifications of a specific module.

-Bill



More information about the CMake mailing list