I’ve contributed to maybe 20 open-source projects to try and improve my cmake-fu (amongst other things).
Now, with a reasonable idea of commonalities betwixt projects, I’m ready to write a code-generator to automatically create the CMakeLists.txt and associated CPack files for an arbitrary project.
- Clone non CMake project
- Interactive and CLI arg variants
- Standard version (e.g., C90)
- License †
- Welcome.txt †
- Author (for CPack vendor) †
- Repo/website (for CPack and project) †
- Work with existent
includedirectory adding to likely target (e.g.,
†will try to infer contents
Not sure if additional features are [reasonably] doable:
- Figure out dependencies and add them with
- Generate flex/bison graph
- Figure out OS-specific switching (e.g., only include these files on macOS, and these on Windows)
What do you think, is this a project worth writing?
Related work (GitHub org/repo):
- Project generator (Latest release: January 20'th 2012) - Ogre Forums
- &etc. (there was one old unmaintained one that also allowed adding dependencies on CLI)
If it is worth doing, how do you want this built? - I guess I can do the whole thing in C… or CMake, or something else. Should it try and be a tool included with CMake itself, like