Quote Originally Posted by Uwe View Post
The point is that you are doing it with code that is not written with the intention of being concatenated - breaking the scope of the declarations that were intended by the developer ( who knows the code ). And in the end the build times are worse, than what you get from installing Qwt as a library ( because you only have to build it only once - when you install it ).
The reasons - well, we have several compilers on several platforms and architectures, so it's a lot easier to just compile it with the rest of the project and not maintain it separately. It's also *a lot* easier to update Qwt from SVN - no need to compile and perform installations on all development computers and in all environments simultaneously. We don't usually have any private patches except for very rare and small fixes that I usually report here.

The build time increase - well, it takes 4 seconds to build Qwt as a shared library on my machine (7 seconds without unity), so it's no big deal, really. And for incremental builds it's already there. Note that I'm not saying Qwt *must* be built in a unity way, definitely not, I'm saying the method is something the developers should try for their own projects - it definitely has benefited us.

Breaking the scope - sure, but I don't see how that would actually break the behavior. If there are name clashes, the compiler reports them and we fix them.

I know that some projects maintain Qwt in the way you do it. The reasons I heard so far are:
  1. private patches
  2. being unable to cope with installing and using libraries in general
  3. auto updating to SVN


Unfortunately 2 is the main motivation, but what is yours and why do you handle the Qwt source code different as the source code of a Qt module ?
I guess all three, for the reasons I mentioned above.

We rarely upgrade Qt, but since we usually depend on the SVN features of Qwt, we update it quite frequently. And, since the SVN version is not quite API/ABI-stable, it would mean that we have to update all the environments simultaneously, which is simply too much work for not much gain. Also, we don't build the widgets part and that reduces the compilation time and the generated library size.

Cheers,
Alexander