mrhands

Sexy game(s) maker

  • he/him

I do UI programming for AAA games and I have opinions about adult games


Discord
mrhands31

I finally got include-what-you-use (IWYU) to work on my codebase, which is apparently really hard if you don't want to use CMake. If you do use CMake, you can just switch the compiler, and it will magically work:

  mkdir build && cd build
  cmake -DCMAKE_CXX_COMPILER="%VCINSTALLDIR%/bin/cl.exe" -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=include-what-you-use -G Ninja ...

But you will have a bad time if you're a stubborn old goat like me, who generates his Visual Studio project files by hand. (Because fuck CMake, and also, have you tried getting Qt MOC files to play nice with CMake? Yeah.) I spent yesterday afternoon trying to get the command-line invocations exactly right so that IWYU knows where to find all my headers.

So now I have a nice little Python script and a shiny new problem to solve: Getting the includes correct to make IWYU stop shouting at me without breaking the game. The benefit is that it should slightly optimize compile times. And, once the includes are optimized, I can make running IWYU a step in Jenkins to make computer shout at me remotely whenever I push my changes to the build machine.

It's a distraction for sure, but I'm having fun!


You must log in to comment.