[cmake-developers] [PATCH] FindCUDA: Wrap keyword in if() string comparison
Nils Gladitz
nilsgladitz at gmail.com
Wed Sep 17 08:48:19 EDT 2014
On 09/17/2014 02:37 PM, Rolf Eike Beer wrote:
> What one actually wants is to write
>
> if(arg STREQUAL "OPTIONS")
>
> i.e. arg will get expanded, "OPTIONS" not. Changing everything away from
> that pattern will in fact make things worse, and will not help you if I
> introduce an xOPTION variable now. So, is this warning too noisy or are
> we doing something fundamentally wrong?
One obvious case where it probably warns is
if(arg STREQUAL "WIN32")
Because WIN32 is also a variable with the value "1" on windows this
check probably didn't actually do what it was intended to do with the
old behavior.
Maybe modules loaded from the cmake installation itself should
implicitly have their policy version set to the current cmake version?
Nils
More information about the cmake-developers
mailing list