几天以来,我一直在努力在最新的小牛队上安装VTK。 我尝试过不同类型的安装,但是我收到了一个错误:
CMake Warning (dev) in Common/Core/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "vtkCommonCore" has an INTERFACE_LINK_LIBRARIES property which
differs from its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
vtksys
LINK_INTERFACE_LIBRARIES:
This warning is for project developers. Use -Wno-dev to suppress it.
我试图在CMakeLists.txt文件中设置策略
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
但我收到了错误
CMake Error in Common/Core/CMakeLists.txt:
Target "vtkCommonCore" has policy CMP0022 enabled, but also has old-style
LINK_INTERFACE_LIBRARIES properties populated, but it was exported without
the EXPORT_LINK_INTERFACE_LIBRARIES to export the old-style properties
CMake Error in IO/NetCDF/CMakeLists.txt:
Target "vtkIONetCDF" has policy CMP0022 enabled, but also has old-style
LINK_INTERFACE_LIBRARIES properties populated, but it was exported without
the EXPORT_LINK_INTERFACE_LIBRARIES to export the old-style properties
请帮帮我。 VTK让我疯狂
答案 0 :(得分:0)
1)这是一个警告,而不是错误。
2)设置策略时,设置了错误的策略。