I have a C++ program which I'd like to have output a certain text file at some point. Of course I could have it open, read, and output the text file, but then I have to keep the binary and the text file in sync and located together. I'd rather just compile the file in as a string in some part of my build process.
I've seen things like this done as parts of various IDEs. However I'm building from the command line with gcc or clang.
Of course I could just write my own script that produces a temporary .cpp file at compile time and make that a build step in my Makefile, but I was wondering if there was a more established option for doing this.
I would prefer not to take on a lot of other dependencies just to do this.