<div dir="ltr"><div>Hello Francois,</div><div><br></div>You best place to learn about cross compilation is chapter 8 of the CMake book (Mastering CMake fifth edition). It explains cross compilation in detail and uses VTK as an example project.<div>
<br></div><div>The gist of what you are missing is that for a complex project like VTK, in which the build process itself creates and runs compile time executables that generate code and do system introspection, you need to compile twice. The first compile runs on and produces executables that run on the host system. The second compile runs on (using the compile time executables produced in the first pass) the host but produces executables that run on the target system.</div>
<div style><br></div><div style>In your case you are doing the second pass and have not added the location of the first pass into your CMAKE_PREFIX_PATH, so CMake can not find the compile time executables it needs.</div>
<div style>
<br></div><div style>After that, you will also need to provide the results of the compile time system introspection queries that the host side can not determine. It can't because it has to submit and run those compile time executable on the target system in order to determine the nature of the target system. To do that you provide a TryRunResults file. It turns out not to be too hard to generate that, CMake tells you exactly what to run and what to fill in. But most likely you can just use the one in the ParaView superbuild project (bgp_xlc) or the one in VTK/CMake/TryRunResults-VTK-bgl-gcc.cmake.</div>
<div style><br></div><div style>cheers and let us know how it goes,</div><div style><br></div></div><div class="gmail_extra"><br clear="all"><div>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>
<br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 10:08 PM, François Bissey <span dir="ltr"><<a href="mailto:fbissey@slingshot.co.nz" target="_blank">fbissey@slingshot.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am trying to build vtk 6.0 on a BlueGene/P. I tried to configure<br>
the build with:<br>
ccmake -DCMAKE_SYSTEM_NAME=BlueGeneP-<u></u>static ../VTK6.0.0<br>
<br>
but cmake spit an error message:<br>
CMake Error at CMakeLists.txt:98 (find_package):<br>
By not providing "FindVTKCompileTools.cmake" in CMAKE_MODULE_PATH this<br>
project has asked CMake to find a package configuration file provided by<br>
"VTKCompileTools", but CMake did not find one.<br>
<br>
Could not find a package configuration file provided by "VTKCompileTools"<br>
with any of the following names:<br>
<br>
VTKCompileToolsConfig.cmake<br>
vtkcompiletools-config.cmake<br>
<br>
Add the installation prefix of "VTKCompileTools" to CMAKE_PREFIX_PATH or<br>
set "VTKCompileTools_DIR" to a directory containing one of the above files.<br>
If "VTKCompileTools" provides a separate development package or SDK, be<br>
sure it has been installed.<br>
<br>
I cannot find any of these files anywhere. Are they files that I am supposed<br>
to provide for cross compilation? If so what should be in them? The wiki page<br>
on cross compiling with cmake doesn't really offer me any clues and neither<br>
does the code in CMakeLists.txt.<br>
<br>
<br>
-- <br>
Dr François Bissey<br>
BlueFern team - <a href="http://www.bluefern.canterbury.ac.nz" target="_blank">http://www.bluefern.<u></u>canterbury.ac.nz</a><br>
University of Canterbury<br>
New Zealand<br>
______________________________<u></u>_________________<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/<u></u>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_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/<u></u>listinfo/vtkusers</a><br>
</blockquote></div><br></div>