[CMake] Re: Why can't INSTALL(TARGET ...) find an executable that CMake built?e

Christian Convey christian.convey at gmail.com
Mon Jul 30 15:53:45 EDT 2007


> On Monday 30 July 2007 15:23, you wrote:
> > On 7/30/07, Christian Convey <christian.convey at gmail.com> wrote:
> > > > Can you try to create a minimal testcase so we can reproduce the
> > > > problem here ?
> > > >
> > > > Alex
> >
> > I've got a pretty minimal test case.  The problem installing an
> > executable "Foo" seems to only occur when Foo's CMakeLists.txt file
> > contains a line like:
> >    TARGET_LINK_LIBRARIES(Foo Bar)
> > where 'Bar' is the target name of a library I'm building as part of
> > the same project.
> >
> > I've attached a tar file that should let you easily reproduce this.
> > You don't need to specify any cache variables, and you should see the
> > problem if you just run "make; make install".
>
> I didn't try yet.
> By running "cmake -P ..." you skip the dependency on the relinking target.
> Does it work if you "make install" first and then run "cmake -P ..." ?

Interesting:

When I ran "cmake -P ..." repeatedly (any number of times), it always fails.

When I ran "make install" repeatedly (any number of times), it always fails.

But if I run "make install" even once, then any future invocation of
"make -P ..." *is* successful.


More information about the CMake mailing list