[Cmake] Dependency on generated file

DL dlacct at hotmail.com
Mon May 12 17:03:28 EDT 2003


I have a file, called generator.c, which when compiled and run, dumps to std
out a bit of C code that I need to redirect to a file - out.c, for example.
The file out.c is then #included into another file, lib.c, which I want to
compile into a static library.

How do I create a dependency between the generated file out.c and the
generating executable made from generator.c so that they're built first and
lib.c can be properly compiled?

In other words,
generator.c => generator
generator ==> out.c
out.c, lib.c == > libmylib

Thanks,
DL



More information about the CMake mailing list