I have something like the following snippet in a CMakeLists.txt:
file(READ api.yaml API_YAML)
configure_file(schemautil.h.in schemautil.h)
The variable ${API_YAML}
is used in schemautil.h.in
When I go to build, the configured file schemautil.h
does not regenerate when I make changes to api.yaml
.
How do I make updates to api.yaml
trigger the configure_file
line?
Also, if there is a better way to accomplish what I'm doing here -- i.e. stuffing api.yaml
into source code at compile time, I'm interested.