[vtkusers] Having VTK in both DEBUG and RELEASE mode

John Drescher drescherjm at gmail.com
Sat Sep 15 19:58:34 EDT 2012


On Sat, Sep 15, 2012 at 7:14 PM, cel02000 <cel02000 at yahoo.com> wrote:
> Awesome! It was very frustrating finding the answer. Thanks.
>
> Do you mean I have to use CMAKE to configure and generate
> VTK_DIR=VTK5.8BuildDebug and build ALL_BUILD and then repeat everything for
> VTK_DIR=VTK5.8BuildRelease (with proper CMAKE_CONFIGURATION_TYPE)?
>

No. I specify a single build folder in cmake-gui for each library. For
example I have the source of VTK-5.10.0 at

x:\CMakeBased\Libraries\VTK-5.10.0

And then for the build tree for x64 I put that at

x:\64bit\VC.100\Libraries\VTK-5.10.0

And configure CMake to Build Debug, Release and RelWithDebInfo static
libraries in that one build folder.

Then for my applications when CMake-gui says it can't find VTK, I set
VTK_DIR to x:\64bit\VC.100\Libraries\VTK-5.10.0

CMake will automatically handle all my configurations correctly so
that my applications Debug build will use Debug VTK libs ...

Now to build vtk and other large packages I usually use

cmake --build --config=Release
cmake --build --config=Debug
cmake --build --config=RelWithDebInfo

in the binary folder using a x64 Visual Studio command prompt. This
saves me from the long Visual Studio load time and on some systems
(with lots of cores) I can run these in parallel for faster compiles.

John



More information about the vtkusers mailing list