Unknown CMake command "vtkMacroKitPythonWrap" in snapshot release for vtkTeem

Hi all,

I am upgrading all the projects I have to the new snapshot release, and one of them produced a strange CMake error:

Configuring library: vtkTeem
CMake Error at Libs/vtkTeem/CMakeLists.txt:149 (include):
  include could not find load file:

    vtkMacroKitPythonWrap

CMake Error at Libs/vtkTeem/CMakeLists.txt:151 (vtkMacroKitPythonWrap):
  Unknown CMake command "vtkMacroKitPythonWrap".

The reason it is strange is that for vtkAddon and vtkSegmentationCore the same thing does not happen (or maybe the build process does not get that far?). Anyway, before starting digging deep in what changed in CMake, I thought I ask here because I have seen lots of things changing lately around Python wrapping of CMake. What I tried so far is adding vtkTeem in lists where vtkSegmentationCore was present but not vtkTeem, but it did not help.

Do you @jcfr @lassoan have any idea or suggestion what to try? Thanks a lot!

I am upgrading all the projects I have to the new snapshot release
Unknown CMake command “vtkMacroKitPythonWrap” in snapshot release for vtkTeem

To summarize, you are building a custom application based of GitHub - Slicer/Slicer at v4.11.20200930 and you observe this build error ?

Was the custom app built following this pattern: GitHub - KitwareMedical/SlicerCustomAppTemplate: Template to be used as a starting point for creating a custom 3D Slicer application ?

Yes and yes. However, only one custom app has this error and it occurs if I do repetitive clean builds.

I enabled building vtkAddon and the build succeeded.