I've read:
cmake custom command to copy and rename
and I want to do something similar, but rather than copying a file, I want to generate a file. If that wasn't in a custom command, I would write:
file(WRITE "generated.c" "int main() { return 0; }")
but it doesn't seem like cmake -E
supports this directly. What should I do (other than run something platform-dependent)?