[CMake] running FIND_PROGRAM twice

David Cole david.cole at kitware.com
Mon Jan 14 22:10:23 EST 2008


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/6dd5c017/attachment.html


More information about the CMake mailing list