[CMake] newbie question

Yong Chul Ju yochju at gmail.com
Mon Nov 8 08:42:50 EST 2010


1. cmake:mex problem
According to the webpage (http://www.cmake.org/Wiki/CMake:MatlabMex)
we can tell CMake (patched version) to treat the mex build script as the
project's compiler which can be done by the command (CC=mex CXX=mex cmake
/path/to/project/source).
For the examples they provided, it has no problem. It works perfectly fine.
But when it comes to kvl code, it does not.

When I run the command: CC=/m/fs/software/matlab/r2010b/bin/mex
CXX=/m/fs/software/matlab/r2010b/bin/mex ../../cmake-2.8.2/bin/cmake
../my project name
-- Configuring done
-- Generating done
-- Build files have been written to: /my project path

After that, when I run "make", then I got following:

[  0%] Building CXX object CMakeFiles/kvlAddBorder.dir/kvlAddBorder.o

    mex:  -ftemplate-depth-50 not a valid option.

    Usage:
      MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
          [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

    Use the -help option for more information, or consult the MATLAB
External Interfaces Guide.

make[2]: *** [CMakeFiles/kvlAddBorder.dir/kvlAddBorder.o] Error 1
make[1]: *** [CMakeFiles/kvlAddBorder.dir/all] Error 2
make: *** [all] Error 2

The problem is I cannot find any option of "-ftemplate-depth-50" anywhere
in "mex".

The project uses ITK, VTK (built by CMake release mode), fltk, gmm, tetgen.

For all the above mentioned program, patched version of CMake was used.

What seems to be a problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101108/1a236a05/attachment.htm>


More information about the CMake mailing list