[CMake] ADD_CUSTOM_TARGET behavior 2.4 vs 2.6?
Roland Philippsen
roland.philippsen at gmx.net
Tue Aug 26 21:10:56 EDT 2008
Hi list,
It is quite possible that the following problem arises because I
misunderstant custom targets, but it worked under cmake-2.4 (various
patch levels, various UNIX-ish operating systems).
Attached is a mini-project which triggers an error due to the way that
COMMANDs are parsed by ADD_CUSTOM_TARGET(). My custom command is
essentially saying "if there is no symlink, create it", like this:
$ test -L foobar || ln -s /Users/rolo/soft/check foobar
Under cmake-2.6 at make time, this gets translated to
$ test -L foobar "||" ln -s /Users/rolo/soft/check foobar
^^^^
Where the quotes around the or-operator break the command and make
bails out with "/bin/sh: line 1: test: too many arguments".
What's the correct way of specifying such a command? I did specify the
VERBATIM option to ADD_CUSTOM_TARGET()...
Or is there an altogether better way to create symlinks?
Thanks in advance,
Roland
--
Roland Philippsen
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE84C528D
http://poftwaresatent.net/ skype: poftwaresatent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check.tgz
Type: application/x-gzip
Size: 664 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080826/40e7a350/attachment-0001.bin>
More information about the CMake
mailing list