FPHSA: Avoid if() dereferencing of quoted variable

Legacy invocations may pass a variable name where "DEFAULT_MSG" belongs.
When comparing FPHSA_FAIL_MESSAGE to "DEFAULT_MSG", use a leading "x" on
both sides to avoid mistaking the value of the message for a variable
name.
This commit is contained in:
Brad King 2014-09-08 11:20:27 -04:00 committed by Nils Gladitz
parent 425acc522f
commit e177e7affb
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# now that we collected all arguments, process them # now that we collected all arguments, process them
if("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG") if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
endif() endif()