On Fri, Jun 18, 2010 at 1:12 PM, Tyler Roscoe <[email protected]> wrote:

> On Fri, Jun 18, 2010 at 01:06:46PM -0400, David Cole wrote:
> > On Fri, Jun 18, 2010 at 1:01 PM, Tyler Roscoe <[email protected]> wrote:
> > > On Fri, Jun 18, 2010 at 06:30:25PM +0200, Eric Noulard wrote:
> > > > 2010/6/18 Tyler Roscoe <[email protected]>:
> > > > > 1. I want to change where "make package" deposits the packages it
> > > > > creates.  Is there a way to do this -- some cpack variable I
> haven't
> > > > > found?
> > > >
> > > > No variable I am aware of.
> > > > However you may create a custom target which call make package and
> then
> > > > move the file, provided you know the name of the generated file ....
> > >
> > > The frustrating part here is that I can't add_dependencies or
> post-build
> > > custom_commands to the PACKAGE target because it is a "magic" CMake
> > > target. I suppose I can look into writing a custom_command that runs
> > > cpack with appropriate arguments, but I hoped to avoid this step.
> >
> > But you could make a "build-products-done" custom target, and then use
> > add_dependencies with that and all the other "real" CMake targets that
> you
> > have to make it go last after all the real stuff is built.
> >
> > Then you can add another custom target to do as much 'make package' type
> > stuff as you want and make it depend on the "build-products-done" custom
> > target...
>
> I also need "make install" and "make package" to run. How can I force my
> build-products-done target to depend on installation and packaging? Or
> am I misunderstanding you?
>

Add a custom target "myinstall" that does a "make install" under the covers.
Similarly for make package.

Then have those custom targets depend on the build-products-done target.

Then..... instead of typing "make" or the explicit "make all" (or make
install, or make package) on the command line, you'd type "make myinstall"
or "make mypackage".

You're understanding correctly as far as I can tell, but you don't need the
build-products-done to depend on installation and packaging. Those happen
post-build. So you need to depend on the build-products-done, not the other
way around.

If you need to run something after installation and packaging, and it has to
be done from make, then the only way to do it right now with existing cmake
is to have custom targets that act the same, but have different names than,
'install' and 'package'...

Capisce?

:-)
David



> > Because to do what you want, you want multiple make package steps anyhow,
> > right?
>
> I don't think I need this. I only need "make package" to run once; then
> I can simply consume the results of packaging -- the
> myproject.[tar.gz|.zip|.exe] files.
>
> Thanks David,
> tyler
>
_______________________________________________
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

Reply via email to