[cmake-developers] Which binaries should be required in FindLATEX?

Brad King brad.king at kitware.com
Mon Dec 22 10:12:43 EST 2014


On 12/22/2014 02:44 AM, Christoph Grüninger wrote:
> please find attached a patch that introduces components handling for
> optional LaTeX executable.

Thanks for working on this.

> Maybe we should deprecate the old variables name?

The names should not be changed at all.  They become cache entries
that people may be setting in their scripts on the command line, or
have set in existing build trees.  Also the names are visible to the
human in cmake-gui so calling them "..._FOUND" does not make sense.

The FPHSA component handling still leaves it to the module code to
specify whether each component was found.  Therefore you should just
use a pattern like this:

 find_program(LATEX2HTML_CONVERTER ...)
 if (LATEX2HTML_CONVERTER)
   set(LATEX_LATEX2HTML_FOUND 1)
 else()
   set(LATEX_LATEX2HTML_FOUND 0)
 endif()

Once you have that explicit mapping then you can optionally use
lower-case component names.  I have no strong preference on that
though.

Thanks,
-Brad



More information about the cmake-developers mailing list