cmake: make ocv_cmake_dump_vars() case insensitive

This commit is contained in:
Alexander Alekhin 2016-01-15 14:38:25 +03:00
parent 9cd6731894
commit 8f37a3a37c

View File

@ -2,12 +2,14 @@ include(CMakeParseArguments)
# Debugging function
function(ocv_cmake_dump_vars)
set(VARS "")
get_cmake_property(_variableNames VARIABLES)
cmake_parse_arguments(DUMP "" "TOFILE" "" ${ARGN})
set(regex "${DUMP_UNPARSED_ARGUMENTS}")
get_cmake_property(_variableNames VARIABLES)
set(VARS "")
string(TOLOWER "${regex}" regex_lower)
foreach(_variableName ${_variableNames})
if(_variableName MATCHES "${regex}")
string(TOLOWER "${_variableName}" _variableName_lower)
if(_variableName MATCHES "${regex}" OR _variableName_lower MATCHES "${regex_lower}")
set(VARS "${VARS}${_variableName}=${${_variableName}}\n")
endif()
endforeach()