FPHSA: remove unneeded variable dereferencing

These variables can be dereferenced by if() alone so do not do it here, avoiding
the risk of their content being treated as a variable name and dereferenced
again.
This commit is contained in:
Rolf Eike Beer 2014-10-24 14:07:21 +02:00
parent 97eb511672
commit 22362c65e1
1 changed files with 2 additions and 2 deletions

View File

@ -319,7 +319,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
endif ()
unset(_VERSION_HEAD)
else ()
if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL VERSION)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
@ -329,7 +329,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
unset(_VERSION_DOTS)
else() # minimum version specified:
if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
if (${_NAME}_FIND_VERSION VERSION_GREATER VERSION)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()