[cmake-developers] Introduction and volunteering for the Matlab package

Brad King brad.king at kitware.com
Thu Feb 19 10:48:21 EST 2015


On 02/19/2015 10:20 AM, Raffi Enficiaud wrote:
>> If find_program doesn't find it, "which" won't have better luck.
> 
> I tested that yesterday on a regular LTS14.04 server. find_program
> fails while "which matlab" does not.

Please figure out why find_program fails so we can fix it rather
than working around it with "which".  The find_program command
searches the PATH just like "which" does.  Is "matlab" one of
those executables with "x" permission but not "r" permission?

> Finding the matlab program from time to time is for me an
> implementation detail

Okay, I just wanted an explanation for why there are so many
find_program calls for the same thing.  If the design is better
that way then so be it.  However:

> Also the main functionality is not performance oriented.
> If I start trying to optimize all those calls, I would have
> complicated execution paths.

Caching is not about performance.  It is about giving the user
the opportunity to set the result explicitly when the automatic
determination gets an undesired result.

There needs to be at least (and ideally exactly) one cache
entry that stores the location of matlab.  If the user sets it
up front then great.  If not then we should search and store the
result there for the user to accept or edit later.  Currently
MATLAB_USER_ROOT allows the user to specify up front, but does
not serve the second role.

-Brad


More information about the cmake-developers mailing list