# How to build examples in VTK 9.0.0-rc2 source

**URL:** https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092
**Category:** Support
**Created:** [April 18, 2020, 8:40pm UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092 "2020-04-18T20:40:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![opoplawski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/opoplawski/32/321_2.png) [@opoplawski](https://discourse.vtk.org/u/opoplawski)
#### Post date: [April 18, 2020, 8:40pm UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092/1 "2020-04-18T20:40:55Z")

</div>

I’m working on updating the Fedora VTK package to 9.0.0-rc2 and I’m having difficulty with the examples. It does not appear that the examples are built by simply running “make” anymore. Is this expected? My cmake command is:  
/usr/bin/cmake -DCMAKE\_C\_FLAGS\_RELEASE:STRING=-DNDEBUG -DCMAKE\_CXX\_FLAGS\_RELEASE:STRING=-DNDEBUG -DCMAKE\_Fortran\_FLAGS\_RELEASE:STRING=-DNDEBUG -DCMAKE\_VERBOSE\_MAKEFILE:BOOL=ON -DCMAKE\_INSTALL\_PREFIX:PATH=/usr -DINCLUDE\_INSTALL\_DIR:PATH=/usr/include -DLIB\_INSTALL\_DIR:PATH=/usr/lib64 -DSYSCONF\_INSTALL\_DIR:PATH=/etc -DSHARE\_INSTALL\_PREFIX:PATH=/usr/share -DLIB\_SUFFIX=64 -DBUILD\_SHARED\_LIBS:BOOL=ON … -DVTK\_CUSTOM\_LIBRARY\_SUFFIX= -DVTK\_INSTALL\_ARCHIVE\_DIR:PATH=lib64 -DVTK\_INSTALL\_DATA\_DIR=share/vtk -DVTK\_INSTALL\_INCLUDE\_DIR:PATH=include/vtk -DVTK\_INSTALL\_LIBRARY\_DIR:PATH=lib64 -DVTK\_INSTALL\_PACKAGE\_DIR:PATH=lib64/cmake/vtk -DVTK\_PYTHON\_VERSION=3 -DVTK\_WRAP\_JAVA:BOOL=ON -DJAVA\_INCLUDE\_PATH:PATH=/usr/lib/jvm/java/include -DJAVA\_INCLUDE\_PATH2:PATH=/usr/lib/jvm/java/include/linux -DJAVA\_AWT\_INCLUDE\_PATH:PATH=/usr/lib/jvm/java/include -DVTK\_WRAP\_PYTHON:BOOL=ON -DVTK\_USE\_OGGTHEORA\_ENCODER=ON -DVTK\_USE\_EXTERNAL=ON -DVTK\_MODULE\_USE\_EXTERNAL\_VTK\_gl2ps:BOOL=OFF -DVTK\_MODULE\_USE\_EXTERNAL\_VTK\_libharu=OFF -DVTK\_BUILD\_DOCUMENTATION:BOOL=ON -DVTK\_BUILD\_EXAMPLES:BOOL=ON -DVTK\_BUILD\_TESTING:BOOL=ON

From a quick glance at Examples/CMakeLists.txt it seem like the examples may only be built as part of the tests? This would be unfortunate as the standard rpm build order is:

- build
- install
- check (run tests)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [April 20, 2020, 3:07am UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092/2 "2020-04-20T03:07:15Z")

</div>

@ben.boeckel FYI

Indeed, the examples are made only via a specific test.  
Why do you need to build the examples though ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [April 20, 2020, 12:23pm UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092/3 "2020-04-20T12:23:08Z")

</div>

The test suite should work against the install tree as well (though it looks like the examples aren’t wired up for that right now). See the `Testing/External` directory if you want to do that. We can make the examples work through that too.

---

<div class="post-metadata">

### Author: ![opoplawski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/opoplawski/32/321_2.png) [@opoplawski](https://discourse.vtk.org/u/opoplawski)
#### Post date: [April 23, 2020, 3:40am UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092/4 "2020-04-23T03:40:29Z")

</div>

There is some amount of historical baggage here. The Fedora vtk package has always built the examples and shipped them in an examples sub-package. I have no idea if anyone actually makes use of them. But I would be happy to drop it at this point if it’s not simple to build them.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [April 23, 2020, 1:34pm UTC](https://discourse.vtk.org/t/how-to-build-examples-in-vtk-9-0-0-rc2-source/3092/5 "2020-04-23T13:34:41Z")

</div>

If you’re running tests, assuming they pass, you can just install the `Examples` directory as such. There are no build artifacts, but I think they can be dropped from the package.

Dropping the package also seems fine to me.
