Skip to content

Commit e034568

Browse files
committed
FIX - avoid attempt to compile conditional on the matlab version
1 parent 7e5facf commit e034568

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utilities/ft_compile_mex.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ function ft_compile_mex(force)
110110
% use the C interface
111111
L = add_mex_source(L,'src','mxSerialize_c');
112112
L = add_mex_source(L,'src','mxDeserialize_c');
113-
else
113+
elseif ft_platform_supports('matlabversion',-inf,'2014a')
114114
% use the C++ interface
115115
L = add_mex_source(L,'src','mxSerialize_cpp');
116116
L = add_mex_source(L,'src','mxDeserialize_cpp');
117+
else
118+
% the undocumented built-in mxSerialize.c does not exist anymore in versions
119+
% >2014a, so the source file cannot be compiled. See issue #2491 on github (which
120+
% provides a link to another solution, also relying on undocumented matlab)
117121
end
118122

119123
oldDir = pwd;

0 commit comments

Comments
 (0)