[CMake] running FIND_PROGRAM twice

David Cole david.cole at kitware.com
Mon Jan 14 22:13:17 EST 2008


And from the middle of the same text:
    is created to store the result of this command.  If the program is
    found the result is stored in the variable and the search will not be
    repeated unless the variable is cleared.  If nothing is found, the
    result will be <VAR>-NOTFOUND, and the search will be attempted again
    the next time FIND_PROGRAM is invoked with the same variable.  The

Score: pretty-clear 2 / not-so-clear 0


On 1/14/08, David Cole <david.cole at kitware.com> wrote:
>
> On 1/14/08, Brandon Van Every <bvanevery at gmail.com> wrote:
> >
> > On Jan 14, 2008 9:14 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> >
> >This is all documented in the find_* commands.
> >
> > I don't think the docs are entirely clear about different invocations
> > of FIND_PROGRAM that use the same variable.
>
>
> C:\Documents and Settings\David>"C:\Program Files\CMake 2.4\bin\cmake"
> --help-command FIND_PROGRAM
> cmake version 2.4-patch 6
>
> < most of the documentation omitted for brevity -- except for these last 6
> lines: >
>
>        in the locations specified by their environment.  Projects may
>        override this behavior by simply calling the command twice:
>
>           FIND_PROGRAM(<VAR> NAMES name PATHS paths NO_DEFAULT_PATH)
>           FIND_PROGRAM(<VAR> NAMES name)
>
>        Once one of these calls succeeds the result variable will be set
> and
>        stored in the cache so that neither call will search again.
>
>
> Last two lines pretty much say the result is stored in the cache and
> subsequent calls will not search.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080114/2c5cb892/attachment.htm


More information about the CMake mailing list