[Cmake] Custom Commands
Kevin Wright
krw at viz-solutions.com
Wed May 15 16:27:41 EDT 2002
At 04:22 PM 5/14/2002 -0400, you wrote:
>Look at the docs for SET_SOURCE_FILE_PROPERTIES (something like that)
>specifically the GENERATED flag. I think that should help.
>
>Thanks
>Ken
Thanks Ken. Setting the GENERATED flag for a file in a source list does
stop it from complaining that it doesn't exist during configuration, but
when I use it, it seems to ignore the file altogether during build as well
(doesn't include the file in the library that I'm trying to build). Is
there some trick to using the GENERATED flag, or is this possibly a bug?
What I'm doing is:
ADD_CUSTOM_TARGET -> creates gensrc.cxx
SET_SOURCE_FILE_PROPERTIES(gensrc.cxx GENERATED)
SOURCE_FILES( FILES ... gensrc)
ADD_LIBRARY(libname FILES)
If I create an empty version of gensrc.cxx and take out the GENERATED flag,
everything works fine, otherwise I have to choose between not configuring,
or not building.
Thanks for any help,
Kevin.
> > -----Original Message-----
> > From: cmake-admin at public.kitware.com
> > [mailto:cmake-admin at public.kitware.com]On Behalf Of Kevin Wright
> > Sent: Tuesday, May 14, 2002 3:38 PM
> > To: cmake at public.kitware.com
> > Subject: [Cmake] Custom Commands
> >
> >
> > Hi All,
> >
> > I'm just taking a look into using CMake here, so I'm brand
> > new, please
> > forgive any stupid questions.
> >
> > I'm trying to set up a sub-directory where first a source
> > file is generated
> > using an external utility, then that source file (along
> > with other static
> > ones) are to be built into a library.
> >
> > So, I've used ADD_CUSTOM_COMMAND to create a target that
> > will build the
> > extra source code, but I can't figure out how to
> > incorporate that source
> > file into the library. I tried adding the output of the
> > ADD_CUSTOM_COMMAND
> > to the source list of ADD_LIBRARY, but it complains during
> > configuration
> > that the source file didn't exist.
> >
> > Thanks any help,
> > Kevin.
> >
> >
> > _______________________________________________
> > Cmake mailing list
> > Cmake at public.kitware.com
> > http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list