kevingurney commented on issue #37809:
URL: https://github.com/apache/arrow/issues/37809#issuecomment-1822983326

   Thanks for the suggestion of using `-DMATLAB_FIND_DEBUG=ON`!
   
   We actually figured out a way to continue using `Ninja` (and the rest of the 
existing CI workflow code).
   
   By setting 
[`Matlab_ROOT_DIR`](https://cmake.org/cmake/help/latest/module/FindMatlab.html#variable:Matlab_ROOT_DIR)
 and 
[`MATLAB_ADDITIONAL_VERSIONS`](https://cmake.org/cmake/help/latest/module/FindMatlab.html#variable:MATLAB_ADDITIONAL_VERSIONS)
 explicitly, we were able to get the expected MATLAB version to be detected.
   
   Example CMake code: 
https://github.com/apache/arrow/commit/0114138f856bafb0ddbcf34073d42b63401a1efc#diff-282bdaf7afd3f3d7974e3ab41857a65e3eea6a566107ea7d209ba3fec72e2e77R22
   Successful CI Run with `Ninja`: 
https://github.com/mathworks/arrow/actions/runs/6950057226/job/18909470493
   Correct MATLAB version being detected: 
https://github.com/mathworks/arrow/actions/runs/6950057226/job/18909470493#step:9:34
   
   This seems like a fairly good solution that should also hopefully work when 
future versions of MATLAB are released (i.e. we won't need to constantly update 
the minimum required CMake version in order to get access to the latest 
`FindMatlab` code).
   
   Setting the `Matlab_ROOT_DIR` explicitly may also be more reliable in 
general because `FindMatlab` uses a variety of heuristics to locate MATLAB and 
associated libraries (which generally, seem to work quite well). However, we 
have seen a few sporadic issues in CI that might be related to the heuristics 
not working 100% of the time (e.g. 
https://github.com/mathworks/libmexclass/issues/58).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to