[CMake] CMake & Matlab
James C. Sutherland
James.Sutherland at utah.edu
Thu Apr 15 17:34:00 EDT 2010
I have been trying to get CMake to build Matlab MEX files without any success.
I have hit several problems.
1. It seems that FindMatlab.cmake is not very functional. I am on a Mac with Matlab 2010a and this script cannot find my installation. It seems to be tuned only for windows, and old versions of Matlab. Is it not supported?
2. The instructions on http://www.cmake.org/Wiki/CMake:MatlabMex don't seem to work either.
I tried following the approach of setting MEX as the CC and CXX compiler, but even on the trivial "hello world" example posted on the wiki page, CMake fails during the configure phase:
The C compiler "/Applications/MATLAB_R2010a.app/bin/mex" is not able to compile a simple test program.
Is anyone using Matlab in their CMake files? I am trying to build a rather large project with mixture of C, C++, fortran, Matlab, and python code. I have the C, C++ and python stuff working, but the Matlab part is really causing problems!
Thanks for any tips!
James
More information about the CMake
mailing list