[Cmake] generating source

Doug Henry doug_henry at xontech . com
Wed, 17 Dec 2003 13:47:52 -0500


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