I read this to mean that pretty much everything you want is already
in CMakeLists.txt, but you don’t like its style/syntax so you are re-inventing
the wheel rather than extract the information that is already there.
how about writing a c++ program (rather than perl or python) to extract
the information from CMakeList.txt files, rather than creating yet-another
specification language requiring yet more processing tools.