|
|
|
|
|
by AlotOfReading
1302 days ago
|
|
CMake is pretty simple internally. Every "keyword" is a function call. Every function call is implemented as a class. The simplest way to hijack it would be to have a function that calls out to your external interpreter/tool with the state you want. I could see doing that in a couple of ways: * Add a builtin command [1] that takes a string or filename and calls the interpreter with any additional data you want to pass. * Add a flow control command [1] that passes the inline block to the interpreter of your choice. You'd probably have to override cmFunctionBlocker as well for this. Note that this can't fix the deep design issues in CMake like the insane string representation. And no, I'm definitely not in therapy from CMake-induced PTSD. [1] https://github.com/Kitware/CMake/blob/master/Source/cmComman... |
|
I’m trying to remove the need for external commands to compile Nim when used with ESP-IDF for embedded firmware development, which is dependent on CMake.
Going to take a crack at this today :)