Build error in VTK-based project: “include called with wrong number of arguments. include() only takes one file.”
Build fails when a VTK-based library is configured with VTK-8.90. It worked well with VTK-8.2.
The error message is:
include called with wrong number of arguments. include() only takes one file.
After some digging and internet search it turned out that it caused trouble at a number of other projects, too (VTK examples, PCL, etc).
The solution is to delete include(${VTK_USE_FILE}), which was necessary for building with older VTK versions.
To make transition of projects to VTK-8.9 easier and avoid unnecessary developer frustration, please create a dummy VTK_USE_FILE that prints a meaningful warning message (or prints an error message and aborts the build). This mechanism only needs to kept until most projects make their transition (can be removed in a couple of years).