[CMake] running FIND_PROGRAM twice
Bill Hoffman
bill.hoffman at kitware.com
Mon Jan 14 21:14:09 EST 2008
Brandon Van Every wrote:
> I just filed bug http://cmake.org/Bug/view.php?id=6241 , "FindPerlLibs
> should use FindPerl". My assumption is that if FIND_PROGRAM is run
> twice with the same output variable (in this case PERL_EXECUTABLE),
> the 2nd invocation will wipe out the value from the 1st invocation.
> Is that a correct assumption?
>
No, it is not correct. Once something is found, it can not be set to
NOTFOUND by another find command. If that were true, then cmake would
keep looking for things over and over. It is perfectly valid and
expected to call find_* more than once in a find module. The first one
that finds it will stop the searching. This is all documented in the
find_* commands.
-Bill
More information about the CMake
mailing list