From: Alan W. I. <ir...@be...> - 2006-08-24 05:43:52
|
On 2006-08-23 20:45-0400 Hazen Babcock wrote: > > On Aug 23, 2006, at 8:24 PM, Alan W. Irwin wrote: >> >>> Surprisingly, that is not enough. >>> >>> iMac ~ : echo $PATH >>> /usr/local/bin/:/sw/bin/:/usr/X11R6/bin/:/bin:/sbin:/usr/bin:/usr/sbin >>> iMac ~ : which swig >>> /usr/local/bin//swig >> >> I was just guessing which was a mistake because you can figure this out >> easily and quickly by just looking at FindSWIG.cmake. You will notice >> both >> FIND_PROGRAM and FIND_PATH are used in that module. My experience is >> FIND_PROGRAM will be fine if you have set the PATH correctly (which it >> appears you have done. Looking in the documentation for FIND_PATH leads >> you >> to the environment variable CMAKE_INCLUDE_PATH (also documented in >> http://www.cmake.org/Wiki/CMake_Useful_Variables) which you will also need >> to set appropriately. > > Ok. My question was more along the lines of whether or not it would be okay > to add this path to the default swig search? Yes, but the way you do that is you set environment variables. Here is why. FindSWIG.cmake is an official find modules that comes with CMake, and like most such modules, it uses the fundamental CMake find commands (find_path, find_program, find_library) which in turn (according to the extensive documentation of these find commands) depends on environment variables to find things that are in non-standard locations. > Is /usr/local/bin a non-standard > location for swig? I am virtually positive it is standard on Linux with CMake, but I am not sure for the Mac OS X platform. CMake on Mac OS X probably follows whatever policy Apple has about standard or non-standard /usr/local. Another possibility is /usr/local is standard on Mac OS X, but swig is not completely installed (or not correctly installed) on your platform. To check that go through FindSWIG.cmake to see what files are being looked for and check that you have them all. If all are present then set PATH and CMAKE_INCLUDE_PATH appropriately so they will be found, and that should solve this issue. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |