]> granicus.if.org Git - curl/commit
CMake: Simplify if() conditions on check result variables
authorBrad King <brad.king@kitware.com>
Fri, 14 Nov 2014 21:33:14 +0000 (22:33 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 19 Nov 2014 10:35:15 +0000 (11:35 +0100)
commitfba9f41b84cc591f124cef7d796321cfa000fc8c
treee3d38da14bbde8dbd27b5d1b9ea14cebe0a6302d
parent54fc885efd3a86874c101b28c1744f7692589daf
CMake: Simplify if() conditions on check result variables

Remove use of an old hack that takes advantage of the auto-dereference
behavior of the if() command to detect if a variable is defined.  The
hack has the form:

 if("${VAR} MATCHES "^${VAR}$")

where "${VAR}" is a macro argument reference.  Use if(DEFINED) instead.
This also avoids warnings for CMake Policy CMP0054 in CMake 3.1.
CMake/Macros.cmake