0

From time to time, we are making compilation time optimsations in our C++ project, one of the main issues is optimisation of the include depencencies. It would be nice to have some other measurement than the compile time. What I'm looking for is some easy way to calculate the size of sum of size all of the modules after the preprocessor was applied.

The method can be based on the visual studio solution file in windows or Makefile in linux/osx, but it probably needs to use some of these to resolve the include paths.

It would be also nice, if the calculation could take precompiled headers (list of includes used) into considaration. (Once the include file is in it, it would be counted only once).

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
kovarex
  • 1,766
  • 18
  • 34
  • 3
    Can you clarify what you mean by the sum of the size of the modules? The line count in the processed code? See this question for obtaining preprocessor output, and consider sending output to wc. http://stackoverflow.com/questions/277258/c-c-source-file-after-preprocessing – NicholasM Nov 04 '13 at 08:34
  • This question (and answers) is exactly what was I looking for, I will probably build some script where I would have to copy all the include directories to make it work and send the result to wc. – kovarex Nov 04 '13 at 13:05

0 Answers0