So: I found a way to compile the mex files for Matlab 2020a using:
1/ the following commands:
rm CMakeCache.txt; cmake -DEASDIF_BUILD_MEX:BOOL=on -DUSE_LLVM_STD=1 .
make mex
2/ a small modification of EASDIF_SDIF/matlab/CMakeLists.txt:
replace line 92
SET(MEXFLAGBUILDTYPE CXXOPTIMFLAGS)
by
SET(MEXFLAGBUILDTYPE “”)
as a matter-of-fact, without this small modification, the compilation fails, since the mex environment matlab CXXOPTIMFLAGS contains backslashes, probably used as escape characters for some other use by mex, but messing with the cmake routines of EASDIF. To be more precise, I get the following error message while compiling, that vanishes when I do the modification mentioned above:
-------------------------------------------------------------------
Building with ‘Xcode Clang++’.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -DMATLAB_MEX_FILE -I"/Volumes/Data2/SDIF/EASDIF_SDIF/matlab/…/SDIF/sdifconfig" -I"/Volumes/Data2/SDIF/EASDIF_SDIF/matlab/…" -I"/Volumes/Data2/SDIF/EASDIF_SDIF/matlab/…/SDIF/include" -I"/Volumes/Data2/SDIF/EASDIF_SDIF/matlab/…" -I"/Applications/MATLAB_R2020a.app/extern/include" -I"/Applications/MATLAB_R2020a.app/simulink/include" -fno-common -arch x86_64 -mmacosx-version-min=10.9 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fobjc-arc -std=c++11 -stdlib=libc++ -O2\ -fwrapv\ -DNDEBUG -fPIC -DEASDIF_MATLAB_VERSION=1.2.1 -DEASDIF_IS_STATIC “/Volumes/Data2/SDIF/EASDIF_SDIF/matlab/Fsdif_write_handler.cpp” -o /var/folders/34/p7kxtcrd67n2fxc3pws2853w0000gq/T/mex_13524557894169_17064/Fsdif_write_handler.o
error: invalid integral value ‘2 -fwrapv -DNDEBUG’ in ‘-O2 -fwrapv -DNDEBUG’
error: invalid integral value ‘2 -fwrapv -DNDEBUG’ in ‘-O2 -fwrapv -DNDEBUG’
make[3]: *** [bin/Fsdif_write_handler.mexmaci64] Error 255
make[2]: *** [matlab/CMakeFiles/Fsdif_write_handler.dir/all] Error 2
make[1]: *** [matlab/CMakeFiles/mex.dir/rule] Error 2
make: *** [mex] Error 2
Frédéric, maybe it’s the reason why it fails on your machine with 2019b.
Alexis