[CMake] Autogenerating CMakeLists.txt
Marcus
yhadin002 at sneakemail.com
Fri Nov 9 09:57:22 EST 2007
Hi,
Please could I ask for your opinions on automatically generating
CMakeList.txt files, rather than editing them directly.
My motivation is that I am working on several projects, each broken-down
into sub-projects, and all of them use a consistent directory structure.
I want to take advantage of this uniform structure to minimise the
maintenance work involved in editing CMakeLists.txt files.
By assuming a uniform directory structure, and adding a small
meta-information file to each project, I believe the CMakeList.txt files
could be automatically generated. The meta-information would only include:
* project name
* names of dependencies
* list of sub-projects
The generator would glob for files within each project, so it would be
necessary to rebuild the CMakeList.txt files if meta-information is
changed, or if new files are added to a project. Ideally, the generated
build system should issue a warning when the CMakeLists.txt files are
out of date.
Please let me know if you think this is a feasible (and sensible) solution.
Many thanks,
Marcus
More information about the CMake
mailing list