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

**URL:** https://discourse.cmake.org/t/where-should-i-define-policy-cmp0116-in-a-way-that-it-really-works/11446
**Category:** Usage
**Created:** [August 15, 2024, 8:05am UTC](https://discourse.cmake.org/t/where-should-i-define-policy-cmp0116-in-a-way-that-it-really-works/11446 "2024-08-15T08:05:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cobo](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@cobo](https://discourse.cmake.org/u/cobo)
#### Post date: [August 15, 2024, 8:05am UTC](https://discourse.cmake.org/t/where-should-i-define-policy-cmp0116-in-a-way-that-it-really-works/11446/1 "2024-08-15T08:05:57Z")

</div>

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”:

```auto
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!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 20, 2025, 11:58pm UTC](https://discourse.cmake.org/t/where-should-i-define-policy-cmp0116-in-a-way-that-it-really-works/11446/2 "2025-07-20T23:58:34Z")

</div>

It looks like VTK properly sets the policy now around the call in question. Is this still a problem with more modern VTK/ParaView?
