I am having a hard time deciding how I should manage my OpenCL source code so that my program can compile it at runtime. There seem to be two many strategies. You can create them in you C source as strings (I really don't like this approach since this seems like a horrible way to write code). The second approach seems to be reading the .cl files at runtime using stdio and then compiling them. This is what I have been doing. The only issue I have with this is that it adds a dependency to my program (I would prefer it to be contained in a single executable). Also I seem to need to run my program in the same directory as the .cl files so they can be found. I can think of a few solutions to this but I am just wondering how you guys do it?
Finally, I just tried writing a python script which is run before compilation and generates a header file containing strings corresponding to each .cl file. This way the cl source code can we written separately and included. The issue I have with this is I am not sure how to handle includes within the opencl source. How do you guys go about managing your opencl source code?