[cmake-developers] FindGTest.cmake and CMP0064

David Chen dchen at mail.nih.gov
Tue Nov 17 11:08:15 EST 2015


We’ve been getting a warning from FindGTest.cmake about CMP0064 when building SimpleITK.  The warning occurs at lines 127, 129 and 131 when the variable ${test_type} is equal to “TEST”.  With CMP0064 this TEST could be interpreted as commands in the if() and elseif() statements unless the policy is set to OLD.

I’ve attached a patch for your consideration that re-writes those statements.  I have changed the STREQUAL comparisons to regex MATCHES comparisons.  This change removes the possibility of “TEST” being the first word inside the parentheses.



David T. Chen, PhD                      [MSC contractor]
mailto:dchen at mail.nih.gov <mailto:dchen at mail.nih.gov>               http://lhncbc.nlm.nih.gov/personnel/david-chen <http://lhncbc.nlm.nih.gov/personnel/david-chen>
phone:301.435.3264 <tel:301.435.3264>                      iphone:301.524.3174 <tel:301.524.3174>
Office of High Performance Computing and Communications
National Library of Medicine




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151117/7d538ab9/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactored-if-statements-for-TEST.patch
Type: application/octet-stream
Size: 1865 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151117/7d538ab9/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151117/7d538ab9/attachment-0003.html>


More information about the cmake-developers mailing list