Follow-up to r1919413: CMake: Use configure_file() instead of file(write) to generate modules.c file because configure_file() doesn't change timestamp of file if contents is the the same.