[CMake] CONFIGURE_FILE, Windows and Native vs CMake Paths

Michael Wild themiwi at gmail.com
Tue Aug 10 04:44:32 EDT 2010


On 9. Aug, 2010, at 23:53 , Brian Davis wrote:

>>> Well, I don't think there's a way around it. But you can use a loop to do
> it:
> 
> Ok good to know.
> 
>>> Another thing, though: Never, ever, configure a file into the source
> tree. Doing so is a recipe for disaster...
> 
> Curious as to why.
> 
> This is exactly what I am doing so I can run matlab among other things with
> correct path set where source contains a  set of .m files and launch .mex
> files where Matlab can find them.

You might accidentally overwrite a source file, cleaning the source tree becomes almost impossible etc. Really, stick to the binary tree... If you need files from the source tree to run matlab, also copy them to the binary tree using configure_file(... COPYONLY).

Michael



More information about the CMake mailing list