title: Generate a file with CMake and add it as an executable
body: <p>I have a project that generates a shell script at CMake time (with <code>file(WRITE</code>. How can I get CMake to treat this shell script as an executable of the project (e.g. have it cleaned up, "rebuild", and also installed)?</p>