[vtk-developers] VTK and CMake 2.8rc2 - argument named "TRUE" in a conditional - policy CMP0012

Brad King brad.king at kitware.com
Fri Oct 2 15:10:00 EDT 2009


Brad King wrote:
> Sean McBride wrote:
>> Any CMake experts out there know how to fix it?

I've published a patch here:

  http://github.com/bradking/ParaView/tree/cmake-2.8
  http://github.com/bradking/ParaView/commit/57bcab050be336f0248b840eddf491912f2248a4

This sets new CMake 2.8 policies to NEW behavior, but I have not
tested whether this actually works on all platforms.  I'd appreciate it
if some folks could report back whether things build with the patch so
I can commit it to CVS.

Sean, in the case you posted CXX_HAS_CPP_PRECOMP_FLAG gets set to
true in the following block from VTK/CMake/vtkDetermineCompilerFlags.cmake:

    # -no-cpp-precomp was a compiler flag present only in Apple's gcc and not
    # in the FSF gcc. The flag is obsolete and totally removed in gcc 4.2
    # and later. I believe it is only needed with gcc 3.3 and earlier.
    INCLUDE(${VTK_SOURCE_DIR}/CMake/vtkCheckCXXAcceptsFlags.cmake)
    vtkCHECK_CXX_ACCEPTS_FLAGS("-no-cpp-precomp" CXX_HAS_CPP_PRECOMP_FLAG)
    IF(${CXX_HAS_CPP_PRECOMP_FLAG})
      SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -no-cpp-precomp")
      SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -no-cpp-precomp")
    ENDIF(${CXX_HAS_CPP_PRECOMP_FLAG})

Does this flag actually exist on your compiler, or is the try-compile
going wrong?

Thanks,
-Brad



More information about the vtk-developers mailing list