[CMake] configuration of VTK 5.8 using cmake 2.6 on 64-bit windows 7

John Drescher drescherjm at gmail.com
Thu Dec 8 22:55:47 EST 2011


On Thu, Dec 8, 2011 at 10:51 PM, rakesh patil <prakeshofficial at gmail.com> wrote:
> Hello,
>
> I want to compile VTK 5.8 for 64bit windows machine. I have cmake 2.6 for
> 32-bit windows. I downloaded vtk source code from www.vtk.org website. While
> configuring, I select Visual Studio 9(64) and continued configuration. Then
> I made following changes
>
> CMAKE_CXX_FLAGS = /D_WIN64 /D_WINDOWS (Default was /DWIN32 /D_WINDOWS)
> CMAKE_C_FLAGS = /D_WIN64 /D_WINDOWS (Default was /DWIN32 /D_WINDOWS)
> CMAKE_INSTALL_PREFIX = Appropriate path where lib, header and dll files will
> be saved
> VTK_DATA_ROOT = Path where vtk data resides.
>
> Now what i want to ask is that
> 1) Is it perfectly fine to use 32-bit version of cmake to compile 64bit
> version of VTK?

Yes. I have done that dozens of times.

> 2) What effect will it be if WIN32 is replaced with _WIN64 in flags above?
>

I can't answer that. I have never ever set _WIN64 for any of my 64 bit
builds and I have been programming in 64 bit Visual Studio with cmake
for over 2 years.

John


More information about the CMake mailing list