summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-08 15:20:27 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-09-11 19:23:24 (GMT)
commite177e7affb10fc25b71d4c9d9796c9df7fcdb800 (patch)
treee360cc84926b07a8c0c300968816428dc24bf8e1 /Modules
parent425acc522ff27014ffcc1d1f902f3702dd6c7aa7 (diff)
downloadCMake-e177e7affb10fc25b71d4c9d9796c9df7fcdb800.zip
CMake-e177e7affb10fc25b71d4c9d9796c9df7fcdb800.tar.gz
CMake-e177e7affb10fc25b71d4c9d9796c9df7fcdb800.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index d030418..e8d1dfb 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -201,7 +201,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# 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}")
endif()