[CMake] CMake, ITK, VTK, and Qt 4

Damion Shelton dshelton at tomotechnology.com
Wed May 28 23:07:34 EDT 2008


Hi,

This question involves the interaction of several different toolkits 
during the CMake configuration process, so I apologize if this is the 
wrong venue. I'm receiving the error:

"Warning: CMake is forcing CMAKE_CXX_RELEASE_FLAGS to "/MD /O2 /Ob2 
/DNDEBUG -DQT_NO_DEBUG" to match that imported from VTK"

...when building the InsightApplications repository (with VTK support 
turned on). This message only appears when VTK is built with Qt support; 
with Qt support in VTK disabled there's no problem. This message also 
appears in CMake with our in-house application that uses ITK/VTK/Qt. So 
far we've been hitting Cancel to ignore the warning, apparently without 
consequence (the app compiles and runs correctly).

This appears unrelated the particular build configuration; I typically 
build both ITK and VTK in both release and debug modes and rely on the 
cmake generated project to resolve the correct library set at link time. 
This works fine in both release and debug modes without Qt enabled in 
VTK. Again, even with Qt enabled, the generated project appears correct 
despite the warning.

Any thoughts? The applicable software versions are:

CMake 2.4.8
VTK 5.0.4
ITK 3.4 and 3.6 (both tested)
Qt 4.3.4
Windows Vista with VS 2005 standard

Thanks,
Damion


More information about the CMake mailing list