Hello<div><br></div><div>My problem is this :</div><div><br></div><div>I am having a set of matlab M files which need to be compiled with Matlab compiler mcc.exe.</div><div>And I have separate directory for my matlab files which looks like this:</div>
<div><br></div><div>-MM</div><div> --m files</div><div> dummy.cpp</div><div> cmakelists.txt</div><div><br></div><div><br></div><div>the cmakelists.txt inside the directory:</div><div><br></div><div>ADD_LIBRARY(MM STATIC dummy.cpp)<br>
</div><div><div>ADD_CUSTOM_COMMAND(TARGET MM PRE_BUILD </div><div> COMMAND mcc mcc -B cpplib:mylib ${MM_FILES}</div><div> WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/matlab)</div>
<div><br></div><div>Before I built the MM target the custom command generates mylib.cpp ,mylib.h ,mylib.lib and mylib.dll.</div><div><br></div><div>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?</div>
<div>is this make sense?</div><div>Thank you</div><div><br></div><div><br></div></div>