Brad King wrote:
> I think we need C++-side help for this.  The policy setting should
> be recorded when the target to be linked is created.  That recorded
> setting should be used when evaluating the link interface.  Perhaps
> we need a generator expression like
> 
>  $<TARGET_POLICY:CMP0020>
> 
> which evaluates to 1 if the policy is set to NEW when the target was
> created and 0 otherwise.  If the policy is not set then the C++ code
> evaluating this expression can generate the policy warning.  Only
> specific policies that get recorded at target creation are allowed.
> Others generate an error.
> 

Good point. I've updated the topic on my gitorious clone, and tested that it 
works on Windows. (It required a small fix to a previous topic too).

I wonder if I should/can make this policy 'Qt' specific rather than 'Qt4' 
specific. 

That would allow me to use the same generator expression in the Qt 5 
implementation of this patch, and allow for 'policy behaviour compatibility' 
across the Qt versions. Creating a policy that can be interpreted as 
technically referring to code outside of the cmake repo is also something 
that has probably not been done before. I'd only be checking it in the same 
way from the Qt 5 config file anyway.

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to