I have a C++ Builder project which also involves a few Delphi Pascal files. I've noticed that modifying the implementation section of the PAS files causes many more files to be re-built than are required.
It seems that a new .hpp file is created whenever the .pas file is modified, e开发者_如何学JAVAven though the interface is unchanged. In turn, this causes many .cpp files to need recompiling.
Is there a workaround or trick that can avoid this?
There is a setting (in recent versions, maybe since 2009/2010) to not check dependencies, but I would be very reluctant to use it. (last section in the project options) I would assume that you're not using the .hpp in your pch file, if you're going to be touching the .pas file frequently. (this would make every .cpp require rebuilding, rather than just those that include the .hpp) I suppose you could hack around it by setting the modification date for the .hpp file to a known value in a pre-build step, but I'm as uncomfortable with this as I am turning of the check dependencies setting.
精彩评论