[CMake] How to get exit status of failing custom_command?
Tyler Roscoe
tyler at cryptio.net
Thu Jun 25 18:25:24 EDT 2009
On Thu, Jun 25, 2009 at 11:55:50PM +0200, Marcel Loose wrote:
> No, I'm not sure. I deduced that the command 'cmake -E copy ...' failed,
> because the file was not present in the destination directory, which (by
> the way) needed to be created. So maybe cmake does not return with an
> error status when the file copy fails?
Hmm...
[tylermr at alta:~]$ cmake -E copy tmp.cmake /path/to/nowhere
Error copying file "tmp.cmake" to "/path/to/nowhere".
[tylermr at alta:~]$ echo $?
1
[tylermr at alta:~]$ cmake -E copy tmp.cmake /tmp
[tylermr at alta:~]$ echo $?
0
That looks reasonable. You must have something else going on.
tyler
More information about the CMake
mailing list