ParaView plugins recompile even when nothing changed - CMP0116
Hi,
When I'm using ninja to build a paraview plugin example. It warns about Policy CMP0116
and recompile even when nothing changed in paraview build and in the plugin sources.
-- Configuring done (0.2s)
CMake Warning (dev) at /.../ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:134 (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):
/.../ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:195 (_vtk_module_wrap_client_server_sources)
/.../ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:387 (_vtk_module_wrap_client_server_library)
/.../ParaView/build-debug/lib/cmake/paraview-5.12/ParaViewPlugin.cmake:1214 (vtk_module_wrap_client_server)
Plugin/CMakeLists.txt:3 (paraview_add_plugin)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /.../ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:134 (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):
/.../Projects/ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:195 (_vtk_module_wrap_client_server_sources)
/.../Projects/ParaView/build-debug/lib/cmake/paraview-5.12/vtkModuleWrapClientServer.cmake:387 (_vtk_module_wrap_client_server_library)
/.../Projects/ParaView/build-debug/lib/cmake/paraview-5.12/ParaViewPlugin.cmake:1214 (vtk_module_wrap_client_server)
Plugin/CMakeLists.txt:3 (paraview_add_plugin)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done (0.0s)
-- Build files have been written to: /.../ParaView/examples/live_source
It seems that adding cmake_policy(SET CMP0116 NEW)
to CMake/vtkModuleWrapClientServer.cmake
solve the issue.
I'm using cmake 3.27.4
and ninja 1.11.1