[Cmake] ADD_CUSTOM_COMMAND and PRE_BUILD
Amit Ramesh
amit.ramesh at cshs.org
Tue Jan 3 17:45:26 EST 2006
Hi,
I am currently in a situation where I need a pre_build step
under Linux. I see that CMake does not handle pre_build in the case
of Makefiles, and the last posting I see on this topic (posted Apr
2004, appended below) says that it may not be possible to implement
pre_build in Makefiles. Couldn't the following strategy be used to
achieve it though?
If x is a pre_build condition for y, then I agree that the
following will end up as a pre_link:
y: x
generate y
However, if one ensures that x occurs before y in an initial
build rule, like:
all: x y
x:
generate x
y: z w
generate y
Then x will get done before y or its dependencies (assuming no
parallel builds).
I agree that if one invokes 'make y' instead of 'make' or 'make
all', then x will not get done. So this is only a partial/incomplete
solution to the problem. However, it would still be better than not
having any support for pre_build.
Let me know.
Thanks
Amit
Ken Martin wrote:
PRE_BUILD and PRE_LINK are the same for Visual Studio 6 and all
makefiles.
They both act like PRE_LINK. (Brad said they were POST_BUILD which if
so we
need to change to PRE_LINK) Thanks for the reminder. We intended to
modify
the rules for the Makefile to support PRE_BUILD but looking into it
quickly
I'm not sure makefiles can handle PRE_BUILD. PRE_BUILD can be pretty
useful
but if only Visual Studio 7 can handle it then we may have to remove it.
Thanks
Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060103/9fb65548/attachment.htm
More information about the CMake
mailing list