CMake separate backend and frontend
I don't know if this already exists (I couldn't find anything) or if it's infeasible with the current architecture.
I don't know if you all are familiar with LLVM, but basically the way it works is that LLVM is a "backend" compiler that has many "frontends" that can hook into it. For example, Clang is one frontend for LLVM and it basically handles lexical analysis and parsing of c/c++ files, and then passes that to LLVM, which then turns it into hardware-specific machine code.
I'm looking for something similar with CMake. For example, I would like to write a python-syntax based frontend for CMake that would take care of the lexical analysis and parsing of CMakeLists.py (for example). Then, my frontend would pass a tree of information to the CMake backend which does all the actual work of generating the native build system, etc. Is this even remotely possible without sweeping changes?