summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-16 13:04:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-16 13:04:20 (GMT)
commit3b5ea54a27bc69cf64c87dd5dc2bdc227dc4e776 (patch)
tree763590ddbd6813c65c5a8e17bea6af79034eefbc /Modules
parentc9b301cd7145883611a4ae7f7c09c245581261c2 (diff)
downloadCMake-3b5ea54a27bc69cf64c87dd5dc2bdc227dc4e776.zip
CMake-3b5ea54a27bc69cf64c87dd5dc2bdc227dc4e776.tar.gz
CMake-3b5ea54a27bc69cf64c87dd5dc2bdc227dc4e776.tar.bz2
CheckPrototypeDefinition: Avoid if() auto-dereference
Convert from the old if(MATCHES) hack to if(DEFINED) to check whether the result variable is already set.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckPrototypeDefinition.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index dfa54d8..e203d4c 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -57,7 +57,7 @@ get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
- if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
+ if (NOT DEFINED ${_VARIABLE})
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})