[CMake] ADD_DEPENDENCIES Adding dependency to non-existent target: doc-testHi,

frederic heem frederic.heem at telsey.it
Tue Feb 6 10:28:37 EST 2007


Hi,
Here is the test case:
top level CMakeLists.txt:

ADD_CUSTOM_TARGET(doc
                  COMMAND echo "doc"
                  COMMENT "generate the documentation")
SUBDIRS(test1)

test1 CMakeLists.txt:

ADD_CUSTOM_TARGET(test1
                  COMMAND echo "test1"
                  COMMENT "generate test1 docbook chapter")
ADD_DEPENDENCIES(doc test1)

The archive is available at 
http://www.cmake.org/Bug/bug.php?op=show&bugid=4414
In which project should I have a look to get an example ?
Thanks,
Frederic Heem

PS: cmake 2.4.6

On Tuesday 06 February 2007 2:50 pm, David Cole wrote:
> On 2/6/07, frederic heem <frederic.heem at telsey.it> wrote:
> > > ADD_CUSTOM_TARGET(testFoo ...)
> > > ADD_CUSTOM_TARGET(doc-test ...)
> > > ADD_DEPENDENCIES(doc-test testFoo)
> >
> > thanks for the tips,  but unfortunately, that's not working as expected,
> > running "make doc-test" results in
> > testFoo1
> > doc-test
> > testFoo2
> > doc-test
> > testFoo3
> > doc-test
> > etc ...
> >
> > The target doc-test shall run only once at the end when all target
> > testFoon
> > are executed.
>
> Please reproduce with a small test case that you can forward to the list.
> (Or send your CMakeLists...) If doc-test depends on all of the testFoo*
> targets, then it should not run until *all* of the testFoo* targets have
> been built. I use this technique in several projects and it works for me.
> What version of CMake are you using?
>
> Thx,
> David


More information about the CMake mailing list