[CMake] CMake, ITK, VTK, and Qt 4
Clinton Stimpson
clinton at elemtech.com
Wed May 28 23:33:02 EDT 2008
Damion Shelton wrote:
> 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?
It looks like a harmless warning (not error) in your case.
If you use CMake 2.6, you won't get that warning anymore, as it has
support for adding -DQT_NO_DEBUG for release builds without putting it
into CMAKE_CXX_RELEASE_FLAGS.
Clint
More information about the CMake
mailing list