I'm using CMake and would like to compile a text file into an object file.
eg. I have a text file containing "hello\nworld\n". I would like this to compile to an object as if this file were in fact a C++ file:
char * myString = "hello\n\world\n";
Is there a simple way to do this, preferably in one step? Something like
text_target(myString file.txt);