This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reduce compilation times?


>>Splitting C files is different to splitting C++ files or splitting Java files,
>>Fortran, Ada, ObjC, ....
>
>In the case of C++, you can just put each method of a class in a separate .C file.  Provided they all include a .H file which defines the class prototype it's ok.

The problem may not be the .cpp but the .h files. If I add a new member
or method all files of this class need to be rebuilt. With the independent
functions in C this may be easier to do. But still, if everything is rebuilt
then it doesn't matter how many files you spread your code over.

Of course from maintenance point of view splitting files is good though
I maybe wouldn't go down to function level, more like class level.
Otherwise the bad overview in the file is just transferred to the project
level.

bye  Fabi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]