On 02/13/2015 09:43 AM, Raffi Enficiaud wrote: >> * Why is Matlab_VERSION_STRING cached? Shouldn't it be computed >> every time from the matlab that was found? > > In case the version is not found with an obvious method > (on OSX /Applications/MATLABVersion, on Win32, the version also is > given by the registry key), we have to find the version of matlab > by running matlab itself. I am caching the version once I have it > to prevent any further execution of matlab for retrieving this > information.
Okay. Currently the value is user-facing, but it shouldn't ever be edited manually, right? Instead the detected version could be cached in an INTERNAL cache entry. Also there should be a second internal entry that records which matlab program was executed to compute the version. If the latter does not match then the version should be re-computed. > In case a symlink of the binary called "matlab" exists in /usr/local/bin > for instance, I need to retrieve the path of the libraries mex, mx etc, > that are relative to the real installation path of matlab. In that case I think you should look for those pieces relative to the original executable location first, and if not found then resolve symlinks into a temporary variable name and then use that. The resolved path should not be made user-facing so that any user that sets Matlab_MAIN_PROGRAM explicitly will see that value persist. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers