Where should I define POLICY CMP0116 in a way that it really works?

My CMake project is a ParaView “custom application”, CMake files are “borrowed from” or “designed after” those of ParaView and I must admit that I often do not really know what I am doing because it is far too complex for normal mere mortal brains…

After porting to PV version 5.12, I am receiving a warning message regarding POLICY CMP0116, telling me that it is not specified etc. I know this from the past with other policies, and normally it helps to simply do what you are told: go and specify NEW or OLD.

The same thing seems to happen also in PV itself: You find a cmake_policy(SET CMP0116 NEW) in the “main” CMakeLists.txt file.

I did the same in my own project, but even with a complete rebuild of all CMake stuff, the warning does not go away! Even if I repeat it in all the “subordinate” CMakeLists.txt files over and over again - the warning remains the same, for each and every one of my “plugins”:

CMake Warning (dev) at /home/cornelis/Main/develop/ParaView/Binaries/ParaView-v5.12.0/Release/lib/cmake/paraview-5.12/vtk/vtkModule.cmake:3663 (add_custom_command):
  Policy CMP0116 is not set: Ninja generators transform DEPFILEs from
  add_custom_command().  Run "cmake --help-policy CMP0116" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  /home/cornelis/Main/develop/ParaView/Binaries/ParaView-v5.12.0/Release/lib/cmake/paraview-5.12/vtk/vtkModule.cmake:4209 (_vtk_module_write_wrap_hierarchy)
  Core/AtgDebugLog/CMakeLists.txt:7 (vtk_module_add_module)
This warning is for project developers.  Use -Wno-dev to suppress it.

I do not want to go for -Wno-dev because I still want to see warnings - in order to remove the root causes!