Hello
My problem is this :

I am having a set of matlab M files which need to be compiled with Matlab
compiler mcc.exe.
And I have separate directory for my matlab files which looks like this:

-MM
   --m files
  dummy.cpp
  cmakelists.txt


the cmakelists.txt inside the directory:

ADD_LIBRARY(MM STATIC dummy.cpp)
ADD_CUSTOM_COMMAND(TARGET MM PRE_BUILD
                 COMMAND mcc mcc -B cpplib:mylib ${MM_FILES}
                 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/matlab)

Before I built the MM target the custom command generates mylib.cpp ,mylib.h
,mylib.lib and mylib.dll.

The question is how to make the pre_build event to fire only if some of the
m files changes, i.e how to add file dependencies?
is this make sense?
Thank you
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to