[CMake] ADD_DEPENDENCIES Adding dependency to non-existent target: doc-testHi,
frederic heem
frederic.heem at telsey.it
Tue Feb 6 10:59:39 EST 2007
On Tuesday 06 February 2007 4:43 pm, Bill Hoffman wrote:
> frederic heem wrote:
> > 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
>
> Try add_subdirectory instead of SUBDIRS. SUBDIRS is an old command and
> is processed last no matter its order in the file. So, cmake will not
> know about test1 because the directory will not be processed until after
> the add_dependencies command.
>
Whether add_subdirectory is located before or after the custom target doc,
cmake stills cannot found the doc target when processing test1/CMakeLists.txt
Regarding the subdirs command, would it be possible to emit a warning
explaining that the command is deprecated ?
Thanks,
Frederic Heem
> -Bill
More information about the CMake
mailing list