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

Sean McBride sean at rogue-research.com
Fri Oct 2 17:53:24 EDT 2009


On 10/2/09 5:23 PM, Brad King said:

>So, this was the patch:
>
>  FOREACH(policy CMP0012 CMP0013 CMP0014)
>    IF(POLICY ${policy})
>      CMAKE_POLICY(SET ${policy} NEW)
>    ENDIF()
>  ENDFOREACH()
>
>Try adding the line
>
>  CMAKE_POLICY(GET CMP0012 pol)
>  MESSAGE("CMP0012=${pol}")
>
>after the above block.  Does it say NEW?  It does for me with 2.8.0-rc2.
>Also, try these two lines just before the if() statement that originally
>complained.

You're original patch actually works!  You know what the problem was? 
Funky invisible characters were included when I copy-pasted from the
github webpage you linked to.  What looked like spaces (0x20 ascii) was
actually two bytes (C2A0) which apparently caused CMake to silently
ignore the entire FOREACH statement!  Ack.  If you'd like to take a stab
at fixing _that_ too, see attached.  :)

Have a nice weekend,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/zip
Size: 84122 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20091002/e3162b2c/attachment.zip>


More information about the vtk-developers mailing list