Skip to main content

Posts

Showing posts from February, 2016

Tweaking Waf for integration with Eclipse CDT

First, the way not taken: there is an official Waf extra named "eclipse.py" which theoretically creates the files that Eclipse expects in a project. But that extra is from 2011; both Waf and Eclipse have evolved since then, and I didn't have the time nor inclination to dig into both Waf and Eclipse internals. Also, what would be the end result of that extra: only build support, or full indexing? No docs, no idea, forget it. So let's make it easier. We already know that Eclipse's indexing system only needs to see the compiler command lines to get an idea of what files are related, where are the includes, what are the compiler flags, etc. So what about just making Waf spit out the command lines? And turns out, it's even easy: there is another extra called "print_commands" which does just that.