[ITK-dev] ITK and CMake 3.0 and policy CMP0046

Brad King brad.king at kitware.com
Fri Apr 18 13:16:02 EDT 2014


On Fri, Apr 18, 2014 at 12:40 PM, Sean McBride <sean at rogue-research.com> wrote:
> Has anyone tried ITK and CMake 3.0 yet?
>
>  Policy CMP0046 is not set: Error on non-existent dependency in
>  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
>  Use the cmake_policy command to set the policy and suppress this warning.

Yes, but apparently not with options that cause CMake/itkOpenCL.cmake to
be included.  Every call to add_dependencies in that file is incorrect.  The
add_dependencies command is for inter-target ordering dependencies, not
file-level dependencies.  CMP0046 was added in part to start diagnosing
such incorrect code.

-Brad


More information about the Insight-developers mailing list