How to build examples in VTK 9.0.0-rc2 source

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)

@ben.boeckel FYI

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

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.

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.

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.