On Sun, 2013-07-14 at 19:35 +0000, David Cole wrote:
> > DEPENDS ${targetname}
>
> Instead of using a targetname here in the add_custom_command call, use
> a file name. That’s known to work with the Xcode generator. (I
> think... it’s been a while since I did it personally using Xcode, but
> simple to try...)
Thanks for the note David. Unfortunately this doesn't help. It's not
clear what you mean, exactly, by "use a file name", but I tried this:
get_property(myapp_path TARGET myapp PROPERTY LOCATION)
then I used "${myapp_path}" in the DEPENDS line instead of
"${targetname}", but I got the same failure as before.
From what I can determine about the Xcode generator, it appears to
generate makefile snippets for each target which manage whether that
target should be rebuilt or not. But it appears that it's the xcodeproj
file that contains the dependency relationships between the individual
targets, and that is not being set up correctly.
After the build fails, I can see that indeed the "myapp" target has not
been built, even though the pathnames in the makefile are correct.
So, it appears that CMake knows the correct pathname, but it is not
communicating to Xcode that in order to build that pathname it needs to
run a particular target. Thus, Xcode is not building the targets in the
right order. Or something like that.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake