Ninja: Generated build.ninja file is unnecessarily huge
I was investigating why a shared library was missing a symbol that I expected it to have, and needed to resort to spelunking through the build.ninja file to determine that one of my source files wasn't being included.
The build.ninja file for my project is 11KB, and I expect it to be at least 3x that size when I'm finishing with my current process of moving to cmake from another build system.
Why does the build.ninja file duplicate the values for DEFINES, DEP_FILE, FLAGS, INCLUDES, OBJECT_DIR, OBJECT_FILE_DIR, and so on for each c/cpp file that is being built for a particular target?
Better would be to have a library wide variable set for each of these that each individual source file references, and source files that have overridden settings can specify the values explicitly. Doing this would improve the readability of the ninjafile, and improve parsing time of the ninja file.