Merge topic 'MinorFixFPHSA_13755'

4809cad FPHSA: don't succeed if only checking for XX_FOUND (#13755)
This commit is contained in:
Brad King 2012-11-30 10:36:21 -05:00 committed by CMake Topic Stage
commit d8c0a40d05
1 changed files with 4 additions and 1 deletions

View File

@ -187,8 +187,8 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# user knows better what went wrong (#6375) # user knows better what went wrong (#6375)
set(MISSING_VARS "") set(MISSING_VARS "")
set(DETAILS "") set(DETAILS "")
set(${_NAME_UPPER}_FOUND TRUE)
# check if all passed variables are valid # check if all passed variables are valid
unset(${_NAME_UPPER}_FOUND)
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
if(NOT ${_CURRENT_VAR}) if(NOT ${_CURRENT_VAR})
set(${_NAME_UPPER}_FOUND FALSE) set(${_NAME_UPPER}_FOUND FALSE)
@ -197,6 +197,9 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
endif() endif()
endforeach() endforeach()
if(NOT "${${_NAME_UPPER}_FOUND}" STREQUAL "FALSE")
set(${_NAME_UPPER}_FOUND TRUE)
endif()
# component handling # component handling
unset(FOUND_COMPONENTS_MSG) unset(FOUND_COMPONENTS_MSG)