Haven't posted an update on this in a while.
That's because I've been banging my head against ESP-IDF's extensions on cmake. My overall goal is to change this to not be a bunch of mixed C and swift files, and actually have some structure. It would be neat to be able to mix Swift Package Manager with ESP-IDF's cmake (which https://github.com/anders0nmat/swift-embedded-pm/ suggests you can do, but it's unclear to me how to pass cmake compiler definitions into SPM. For example, freertos.h just has the defaults, and not what's actually built). Because that also interfaces with a build system I'm much more familiar with.
Additionally, I want to import some external dependencies which would be very useful (Swift Testing, for sure, but also Swift Collections because non-copyable dictionary. I'm sure there'll be more). The ones I listed earlier define cmake build systems, but they don't define idf components. Which is problematic for my usage because it creates build errors. I'd rather not make a PR to/fork each of these libraries defining an idf component just to get it to work with my stuff. Hence the desire for "if I could get cmake to play nicely with SPM, then I can mostly stick with what I know and not faff around with cmake more than I absolutely have to."
Open to non-llm based suggestions, FWIW. I really don't know what I'm doing with cmake.