File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1107,3 +1107,6 @@ endif()
1107
1107
# ----------------------------------------------------------------------------
1108
1108
1109
1109
include (cmake/OpenCVPackaging.cmake )
1110
+
1111
+ # This should be the last command
1112
+ ocv_cmake_dump_vars ("" TOFILE "CMakeVars.txt" )
Original file line number Diff line number Diff line change @@ -11,6 +11,37 @@ if(NOT COMMAND find_host_program)
11
11
endmacro ()
12
12
endif ()
13
13
14
+ if (NOT COMMAND cmake_parse_arguments )
15
+ include (CMakeParseArguments OPTIONAL ) # CMake 2.8.3+
16
+ endif ()
17
+
18
+ # Debugging function
19
+ function (ocv_cmake_dump_vars )
20
+ set (VARS "" )
21
+ get_cmake_property (_variableNames VARIABLES )
22
+ if (COMMAND cmake_parse_arguments222 )
23
+ cmake_parse_arguments (DUMP "" "TOFILE" "" ${ARGN} )
24
+ set (regex "${DUMP_UNPARSED_ARGUMENTS} " )
25
+ else ()
26
+ set (regex "${ARGV0} " )
27
+ if (ARGV1 STREQUAL "TOFILE" )
28
+ set (DUMP_TOFILE "${ARGV2} " )
29
+ endif ()
30
+ endif ()
31
+ string (TOLOWER "${regex} " regex_lower )
32
+ foreach (_variableName ${_variableNames} )
33
+ string (TOLOWER "${_variableName} " _variableName_lower )
34
+ if (_variableName MATCHES "${regex} " OR _variableName_lower MATCHES "${regex_lower} " )
35
+ set (VARS "${VARS}${_variableName} =${${_variableName} }\n " )
36
+ endif ()
37
+ endforeach ()
38
+ if (DUMP_TOFILE )
39
+ file (WRITE ${CMAKE_BINARY_DIR} /${DUMP_TOFILE} "${VARS} " )
40
+ else ()
41
+ message (AUTHOR_WARNING "${VARS} " )
42
+ endif ()
43
+ endfunction ()
44
+
14
45
# assert macro
15
46
# Note: it doesn't support lists in arguments
16
47
# Usage samples:
You can’t perform that action at this time.
0 commit comments