[cmake-developers] FindGTest.cmake and CMP0064

Brad King brad.king at kitware.com
Wed Nov 18 11:55:43 EST 2015


On 11/18/2015 11:26 AM, Ben Boeckel wrote:
>>   if(test_type STREQUAL "TEST")
> 
> is it triggering on the right-hand "TEST" argument?

Yes.

> That's not ambiguous to me; is the if() argument parser misdetecting it?

With CMP0054 and CMP0064 set to NEW then

 set(var TEST)
 if(var STREQUAL TEST)

works as expected.  With CMP0054 set to NEW and CMP0064 not set it
warns.  I do not think it should warn, but looking at the code it
would take major refactoring to be able to avoid the false positive.
Either way projects should just set CMP0064 to NEW.

-Brad



More information about the cmake-developers mailing list