<div dir="ltr"><div>I think the means that that there is a new behavior in cmake 3.0.2 which the older vtk 6.2 release code isn't entirely happy with.<br></div><div><br></div>Besides Gib's point, adding a line like the following to the top level CMakeLists.txt should address the warning. <div><br><div><div><div>if(POLICY CMP0040)</div><div>  cmake_policy(SET CMP0040 OLD)</div><div>endif()</div></div></div><div><br></div><div>Updating the CMake script inside VTK's hdf5 to have an existing target is a better fix.</div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Sat, Nov 1, 2014 at 2:15 AM, Gib Bogle <span dir="ltr"><<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">They look to me like warnings, not errors.  Is the build successful?<br>
<br>
Gib<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> vtkusers [<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] on behalf of Sam Raby [<a href="mailto:rabysam28@gmail.com" target="_blank">rabysam28@gmail.com</a>]<br>
<b>Sent:</b> Saturday, 1 November 2014 6:32 p.m.<br>
<b>To:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set....<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04.
<div><br>
</div>
<div>I am running the following command [4] for ccmake: </div>
<div>
<pre style="padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);background-color:rgb(249,249,249);line-height:1.1em">cd /path/to/VTK-Release-build
ccmake -DVTK_QT_VERSION:STRING=5 \
      -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \
      -DVTK_Group_Qt:BOOL=ON \
      -DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake  \
      -DBUILD_SHARED_LIBS:BOOL=ON
      /path/to/VTK</pre>
<div><br>
</div>
but I'm getting the following error:</div>
<div><i><br>
</i></div>
<div><i>(ADD_CUSTOM_COMMAND):</i><br>
</div>
<div>
<div><i>Policy CMP0040 is not set: The target in the TARGET signature of</i></div>
<div><i>add_custom_command() must exist.  Run "cmake --help-policy CMP0040" for </i><i>policy details.  Use the cmake_policy command to set the policy and</i></div>
<div><i>suppress this warning.</i></div>
<div><i><br>
</i></div>
<div><i>The target name</i><br>
</div>
<div><i>"/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h"</i><br>
</div>
<div><i>is unknown in this context.</i></div>
<div><i>This warning is for project developers.  Use -Wno-dev to suppress it.</i></div>
<div><br>
</div>
Would you please hint me how to tackle this error?</div>
<div><br>
</div>
<div>Thanks</div>
<div>-S<br>
<br>
[1] <a href="http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" target="_blank">
http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz</a><br>
[2] <a href="http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run" target="_blank">
http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run</a><br>
[3] <a href="http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz" target="_blank">
http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz</a><br>
</div>
<div>[4] <a href="http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5" target="_blank">http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5</a></div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>