[CMake] FIND_PROGRAM() behavior

David Cole david.cole at kitware.com
Fri Feb 6 12:54:45 EST 2009


Is /sw/bin/python a symlink to /usr/bin/python?


On Fri, Feb 6, 2009 at 12:39 PM, Bill Spotz <wfspotz at sandia.gov> wrote:

> Hello,
>
> Because FIND_PACKAGE(PythonInterp) wasn't behaving exactly the way I
> wanted it to, I was playing around with the following (at the very
> beginning of my CMakeLists.txt file):
>
>  FIND_PROGRAM(PYTHON_EXECUTABLE python)
>  MESSAGE("PYTHON_EXECUTABLE is " ${PYTHON_EXECUTABLE})
>  FIND_PROGRAM(SWIG_EXECUTABLE swig)
>  MESSAGE("SWIG_EXECUTABLE is " ${SWIG_EXECUTABLE})
>
> On my system, the following executables exist:
>
>  /sw/bin/python
>  /usr/bin/python
>  /sw/bin/swig
>  /usr/bin/swig
>
> and /sw/bin comes first in my PATH environment variable.  I would
> expect to get the same paths to both python and swig, but I don't.
> Instead, I get the output
>
>  PYTHON_EXECUTABLE is /usr/bin/python
>  SWIG_EXECUTABLE is /sw/bin/swig
>
> I make sure to delete my cache file before running cmake, so I don't
> think it is a caching issue.  Why else might it behave like this?
>
> Thanks
>
> ** Bill Spotz                                              **
> ** Sandia National Laboratories  Voice: (505)845-0170      **
> ** P.O. Box 5800                 Fax:   (505)284-0154      **
> ** Albuquerque, NM 87185-0370    Email: wfspotz at sandia.gov **
>
>
>
>
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090206/bae3a11f/attachment.htm>


More information about the CMake mailing list