[opencv] 110/251: cmake: ocv_cmake_dump_vars() remove duplicated information
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit a44c0fd51fe082472bf3f23211fc14abb2d5819a
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Wed Jul 19 12:37:36 2017 +0300
cmake: ocv_cmake_dump_vars() remove duplicated information
---
cmake/OpenCVUtils.cmake | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
index 14b1aef..5be3fb8 100644
--- a/cmake/OpenCVUtils.cmake
+++ b/cmake/OpenCVUtils.cmake
@@ -2,21 +2,22 @@ include(CMakeParseArguments)
# Debugging function
function(ocv_cmake_dump_vars)
- set(VARS "")
- get_cmake_property(_variableNames VARIABLES)
+ get_cmake_property(__variableNames VARIABLES)
cmake_parse_arguments(DUMP "" "TOFILE" "" ${ARGN})
set(regex "${DUMP_UNPARSED_ARGUMENTS}")
string(TOLOWER "${regex}" regex_lower)
- foreach(_variableName ${_variableNames})
- string(TOLOWER "${_variableName}" _variableName_lower)
- if(_variableName MATCHES "${regex}" OR _variableName_lower MATCHES "${regex_lower}")
- set(VARS "${VARS}${_variableName}=${${_variableName}}\n")
+ set(__VARS "")
+ foreach(__variableName ${__variableNames})
+ string(TOLOWER "${__variableName}" __variableName_lower)
+ if((__variableName MATCHES "${regex}" OR __variableName_lower MATCHES "${regex_lower}")
+ AND NOT __variableName_lower MATCHES "^__")
+ set(__VARS "${__VARS}${__variableName}=${${__variableName}}\n")
endif()
endforeach()
if(DUMP_TOFILE)
- file(WRITE ${CMAKE_BINARY_DIR}/${DUMP_TOFILE} "${VARS}")
+ file(WRITE ${CMAKE_BINARY_DIR}/${DUMP_TOFILE} "${__VARS}")
else()
- message(AUTHOR_WARNING "${VARS}")
+ message(AUTHOR_WARNING "${__VARS}")
endif()
endfunction()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list