[vtkusers] Creating different named dll's for debug and release - possible?

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Feb 13 14:09:00 EST 2012


On Mon, Feb 13, 2012 at 7:26 AM, Jon Payne <jpayne at hgl-dynamics.com> wrote:
> Hi all,
>
> At when building VTK shared libraries (DLL's on windows specifically) the
> debug and release mode dll's are given the same name. Does anyone know if it
> is possible to give them different names e.g. add a _debug or _release
> suffix?
>
> I know you can't _currently_ but is it possible using CMake? And if so how?
> :)
>
> This would really help us because at the moment when we're developing (and
> deploying) and switching between debug/release mode the wrong version of the
> DLL's can get loaded causing crashes and sometimes hard to diagnose
> problems.
>
It is possible to do with CMake, and we have discussed this briefly
internally. Many projects use a d suffix for the debug versions of
their library, and this seems reasonable. It would require changes to
VTK's build system and the VTKConfig file, along with logic to build
two versions of the library in one build. I am not sure how it would
interact with the Visual Studio generators either, but see the Boost
CMake project for an example where CMake builds multiple versions of a
library with suffixes indicating type and even compiler.

Marcus



More information about the vtkusers mailing list