Re: [CMake] behaviour change in MakefileGenerator3
Alexander Neundorf
a.neundorf-work at gmx.net
Thu Jul 7 17:10:46 EDT 2005
> Von: Brad King <brad.king at kitware.com>
...
> >>Not sure.
> >>I attached a simple testcase.
> >>If you look in cmake-acc/foo/CMakeLists.txt, you will see an
> >>ADD_CUSTOM_COMMAND() which depends on config.h . It doesn't find
> >>cmake-acc/foo/config.h, but instead uses cmake-acc/config.h (which is
> not
> >>what I would expect). Just remove the ${CMAKE_CURRENT_XXX_DIR}s in
> >>cmake-acc/foo/CMakeLists.txt too see what I mean. (cmake cvs june 29th,
> >>unix makefile generator).
> >>
> >>Bye
> >>Alex
> >
> >
> > If I have in foo/CMakeLists.txt the following command:
> >
> > ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/config.c
> > COMMAND cp
> > ARGS config.c.in config.c
> > DEPENDS config.h)
> >
> > the following rule is produced:
> >
> > foo/config.c: config.h
> > foo/config.c: foo/hello.dir/config.c.build.make
> > @echo "Generating config.c"
> > cd /usr/home/alex/src/cmake-acc/foo && cp config.c.in config.c
> >
> > IMO obviously foo/config.c should depend on "foo/config.h" instead of
> only
> > "config.h". This is how it was up to UnixMakefileGenerator2.
>
> I just tried this and I think it has been fixed. I get a dependency on
> foo/config.h.
>
> -Brad
It doesn't seem so.
If you look in cmake-acc/foo/CMakeLists.txt, you will see that in
ADD_CUSTOM_COMMAND() config.h is prefixed with ${CMAKE_CURRENT_SOURCE_DIR}.
Without this it still fails and it generates a dependency to config.h
(instead of foo/config.h)
Bye
Alex
P.S. very cool that configure_file() works now as expected :-)
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
More information about the CMake
mailing list