ufz/ogs — pull request #170 by bilke (2013-07-18 09:05:22+00:00)
Title: Integration of VTK-6

This PR migrates the Data Explorer to VTK version 6.

Everything seems to work so far although there are two places (in *VtkRaster.cpp* and *VtkVisHelper.cpp*) marked with a `TODO` where some functions were removed from VTK.

----

Also this PR introduces functionality to automatically download and compile VTK locally as it is already the case with Boost (as an *CMake External Project*, see *scripts/cmake/ExternalProjectVtk.cmake*):

* First it checks for system installed VTK
* If not found it compiles VTK locally in the build directory
* The compilation takes place at build time
* When VTK was compiled successfully CMake is automatically run again to find that VTK
* With `make` this procedure is flawless, just run `make` once and everything will be compiled
* On Visual Studio you will get nagged by lots of *"The project has changed. Do you like to reload?"*-dialogs. Please reload everything. When everything is finally built these dialogs will go away.

----

**One problem remains:** On Linux VTK gets build with `make -j NUM_PROCESSORS` to speed things up. I do not know why but the build does not succeed in the first run. So we have two options:

* Just type `make` again
* We remove the parallel compilation (much slower when you a multi-core machine.)

----

VTK is now much more modularized and we can have different VTK-subsets for different configurations (see variable `OGS_VTK_REQUIRED_LIBS` in *ExternalProjectVtk.cmake*). At the moment only the library `vtkIOXML` is required for the command line configuration. With it we can use VTK file-IO functionality for reading e.g. meshes in the future. But I can also remove that VTK requirement until we really need it if you want.

----

If you need VTK in a subproject (e.g. MeshLib) please add a CMake-dependency to the VTK CMake rerun functionality:

ADD_DEPENDENCIES(MeshLib VtkRescan)