2010/9/10 Michael Wild <[email protected]>: >> Does this also create dependencies on the multitude of header files >> included by the .c files in SRCS (which would probably be desired in >> case of the OP)? >> >> Ingolf > > No, it will not. But usually you have anyways something like: > > set(SRCS a.c b.c c.h d.c e.c) > set(HDRS a.h b.h c.h d.h e.h)
Which would still fail if some of the .c files also depend on, say, a headers-only library (C++ templates) from another part of the project. Isn't there some simple mechanism which - creates an auto_created.c file - compiles this auto_created.c file with the default flags for the project - links the target "foo" using the object files derived from the "normal" sources and this auto_created.c file whenever "foo" needs to be re-built (or maybe whenever make enters the directory containing "foo")? Maybe there is a way to derive the name of the object files resulting from SRCS and then have auto_created.c depend on those object files? Ingolf _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
