David Williams wrote:
milliams wrote:
This is definitely being caused by the static/shared hack.
Are you referring to the fact that we are able to build both static and shared libs, or to the fact that we can build both
as part of a single build?
I'm referring to the fact that we can build both as part of one build by setting
both ENABLE_SHARED_LIBRARIES
and ENABLE_STATIC_LIBRARIES to true.
David Williams wrote:
milliams wrote:
It may indeed be best to reduce the flexibility so that only one or the other is built and it's impossible to build both at one. I originally wanted to keep the flexibility on Linux but I'm no longer convinced that it's completely necessary. We would then have a single CMake flag which sets which type of library is to be built.
I think this will be fine. We've already established that it's hard to build both at the same time on Windows because both static and shared builds generate a .lib file. If we make the choice between static and shared via a CMake flag then we can probably bring back the option of dynamic libs on Windows, as well as removing all the add_dependancies and simplyfiying the CMake code. I can see that on Linux both static and shared can be useful (you said that some distros prefer shared) but I can't see why a user would want both available at the same time.
I agree. In this case I will this evening make a branch (I'm playing with
git-flow locally) in my checkout and simplify all this down so that in any one build you have to choose between static or shared.
In my mind, the original reason why on Linux I wanted the option to build both at once was for Linux distros to be able to build a package where both are available since they don't know which type the user will want. However, it is slightly unconventional to provide static libraries here and so I don't think it's a great loss. Also, PolyVox is easy enough to include directly into your project or build yourself that I guess many people will do that anyway (especially for games).
David Williams wrote:
The only concern I have would be regarding testing because we have to remember to test both builds. But I don't think there's many problems which would affect just one of the build types.
I can't imagine that there will be any differences in functionality (i.e. bugs) between the two and so I will probably not bother doing both in the nightly builds but we should check them manually from time to time to make sure that they both work properly (I'll continue to use dynamic libraries on Linux).