In a cmake based project (C/C++), if there is a change done in a source file, I would like a means to dump list of affected targets (including transitive dependencies).
I am considering:
- Generate source to .o mapping => generate build files using -GNinja and parse the CMakeFiles/.dir/.o.d files
- Generate a parseable output of --graphviz option => no solution yet
- Figure out a way to handle dependencies added to custom targets using add_dependencies() => no solution yet
What is the best way to achieve this?