It turns out that for the Vim code example, we need to generate three files at configure time, src/auto/pathdef.c, src/auto/config.h, and src/auto/osdef.h:
- pathdef.c records the install path, compile and link flags, the user who compiled the code, and the hostname
- config.h contains compile definitions that are specific to the system environment
- osdef.h is a file containing compile definitions generated by src/osdef.sh
This situation is rather common. We will need to configure a file based on CMake variables, perform a number of platform checks to generate config.h, and execute a script at configure time. In particular, the platform checks are very common for projects striving for portability to accommodate the subtle differences between operating systems.
In the original layout, files are generated under the src folder. We do not...