I’m working on a CMake module which, at some point, invokes
try_run(). The file I’m compiling is not really part of the project’s sources – it’s not used anywhere. It’s only ever useful for CMake, to determine some hardware-related setting.
Now, the module is under
cmake/Modules/. Where, in my repository’s folder hierarchy, should I put the source file?
Note: One option I’m considering is having it in a string within the module and generating a file within
CMakeFiles/; but I don’t know how to do that.