[LLVMdev] Fixing LLVM's CMake interface before LLVM3.5 release

Stephen Kelly steveire at gmail.com
Thu Jul 17 09:00:29 PDT 2014


Dan Liew wrote:

> In [1] I hacked around this by reading the ``LOCATION`` property of
> one of the imported targets. Unfortunately CMake 3.0 really doesn't
> like this I get warnings like
> 
> ```
>   Policy CMP0026 is not set: Disallow use of the LOCATION target property.
>   Run "cmake --help-policy CMP0026" for policy details.  Use the
>   cmake_policy command to set the policy and suppress this warning.
> ```
> 
> The CMake docs seem to say that the reason for this is the LOCATION
> might not be completely known at configure time. In the case of
> imported targets I would disagree because the LOCATION is most
> definitely known.

Yes, for IMPORTED targets, this should work and is unit tested:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake;h=650c8a5c;hb=HEAD

If you can provide an sscce, I would be interested.

Thanks,

Steve.





More information about the llvm-dev mailing list