[Cmake] generating source
Doug Henry
doug_henry at xontech . com
Wed, 17 Dec 2003 14:01:48 -0500
my bad, I was trying many different things and in my haste copied the
wrong stuff, the output if using ADD_CUSTOM_COMMAND is:
make[3]: *** No rule to make target
`/local/workspace/dswng/gencode/types.cpp', needed by
`cmake.check_depends'. Stop.
On Wed, 2003-12-17 at 13:56, Bradley Lowekamp wrote:
> Is that suppose to be ADD_CUSTOM_COMMAND? That may be the problem there.
>
> >Brad
>
> On Dec 17, 2003, at 1:47 PM, Doug Henry wrote:
>
> > the mastering cmake book states that you can generate source files by
> > doing this (e.g. gencode creates types.cpp and types.h):
> >
> > ADD_EXECUTABLE(gencode gencode.cpp)
> > TARGET_LINK_LIBRARIES(gencode somelibs)
> >
> > ADD_CUSTOM_TARGET(
> > OUTPUT types.cpp
> > DEPENDS gencode
> > COMMAND ${EXE_DIR}/gencode
> > ARGS test
> > )
> >
> > ADD_LIBRARY(common types.cpp)
> >
> > but when I run cmake it gives me this error message:
> >
> > CMake Error: can not find file
> > /local/workspace/dswng/gencode/types.cpp
> >
> > Tried .c .C .c++ .cc .cpp .cxx .m .M .mm .h .h++ .hm .hpp .hxx .in
> > .txx
> >
> > What am I missing?
> >
> > Thanks
> >
> > _______________________________________________
> > Cmake mailing list
> > Cmake at www . cmake . org
> > http://www . cmake . org/mailman/listinfo/cmake
> >