FindMatlab 2018a API
This MR allows
FindMatlab to work with MATLAB R2018a and newer, addressing issues raised in #18419 (closed).
MX_LIBRARYis always linked to, it is no longer necessary to give this parameter (it will silently be ignored).
Two new options,
R2018a, can be given. These options mimic the options that the
mexcommand gained in MATLAB R2018a. The first one (it is the default) selects the "compatibility mode", allowing older MEX-files to be compiled with the newer MATLAB. The second option is the alternative, enabling the new complex-interleaved API in R2018a and newer. If
FindMatlabuses an older version of MATLAB, these options are ignored.
We follow the guidance given by a MathWorks employee, and try to mimic the compile and link commands as issued by the