[vtk-developers] Strange CMAKE_BUILD_TYPE

Brad King brad.king at kitware.com
Mon Feb 10 09:21:47 EST 2003


> When compiling vtk with Borland makefiles, CMake gives me
> CMAKE_BUILD_TYPE = Debug;Release

That is strange.  It should only give "Debug" or "Release" by default, not
both.

> but when building with visual studio (dot net) the option is not present
> in the GUI.

This is because all the configurations are generated for MSVC 6 and 7.
Which one is built is selected by the user from the Visual Studio GUI.

> The problem comes when including VTK in other projects (eg ITK and own
> stuff) which all get the "CMAKE_BUILD_TYPE" forced to be "" even though
> I want to put real values in there.

One must use the same C++ compiler for two C++ projects that will link
together..  If you build VTK with MSVC, you must use it for the other
project also, and you must select the same build configuration in the
Visual Studio GUI.  If you build VTK with borland, then its
CMAKE_BUILD_TYPE setting must also be used for the other project (if you
are on windows), so it is automatically imported.

> (Other projects all display CMAKE_BUILD_TYPE regardless of whther they
> use vtk or not... I've tried deleting the cache on all projects etc, but
> still no joy)

This setting is specific to each cmake generator (any Makefile generator
has it, but not the project file generators).  It has nothing to do with
VTK in particular.

-Brad




More information about the vtk-developers mailing list