Zitat von Roland Philippsen <[EMAIL PROTECTED]>:
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

ln already does this check, the option -f is required to overwrite an existing symlink.

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".

Not all environment have shell bahaviour and accept an ||. Usually those should be normal commands with arguments, not something that needs to be interpreted by a shell.

Or is there an altogether better way to create symlinks?

"cmake -E" may help you. However note, that not all filesystems can actually have symlinks.

HS


_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to