1. 5
  1. 1

    I’ve had making something like this in mind for quite some time, but nothing this sophisticated. I’m glad someone else has solved my little problem.

    It actually seems to work. I had to rebuild the entirety of LLVM within a schroot and toy around with CMake to get it working on our project at work at all but hey. It also seems to directly open the terminal, so I was initially unable to redirect it to a file, but that can be circumvented:

    script -c "make -k" include-what-you-use-output

    Then you can use less -R to view it. That’s what comes to my mind immediately anyway.

    1. 1

      We’ve made great use of this in our quest to improve the codebase. By making dependencies explicit, rather than third order includes of includes, it’s dramatically easier see what’s been put in the wrong place.

      Stories with similar links:

      1. include-what-you-use - A tool for use with clang to analyze #includes in C and C++ source files via snej 1 year ago | 7 points | 4 comments