[CMake] Creating symbolic links

Schrader, Glenn gschrad at ll.mit.edu
Thu Feb 5 09:11:10 EST 2009


I'm having some trouble with one of my CMakeLists.txt files. What I want to do is to create a symbolic link to a file in another directory if it doesn't already exist. The commands that looked to my like they should work are:

ADD_CUSTOM_TARGET(run echo "run a test")
ADD_CUSTOM_COMMAND(OUTPUT myLink COMMAND ln;-s;${OTHERDIR}/myLink;myLink)
ADD_DEPENDENCIES(run myLink)

Not only does 'make run' not create a symbolic link, the ln command doesn't show up anywhere in the generated makefiles.

Am I at least on the right track or is there something that I'm completely missing?

Thanks,

--glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090205/a6489235/attachment.htm>


More information about the CMake mailing list