File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ endif()
98
98
99
99
include (cmake/OpenCVUtils.cmake )
100
100
101
+ ocv_cmake_eval (DEBUG_PRE ONCE )
102
+
101
103
ocv_clear_vars (OpenCVModules_TARGETS )
102
104
103
105
# ----------------------------------------------------------------------------
@@ -1254,3 +1256,7 @@ endif()
1254
1256
# ----------------------------------------------------------------------------
1255
1257
1256
1258
include (cmake/OpenCVPackaging.cmake )
1259
+
1260
+ # This should be the last command
1261
+ ocv_cmake_dump_vars ("" TOFILE "CMakeVars.txt" )
1262
+ ocv_cmake_eval (DEBUG_POST ONCE )
Original file line number Diff line number Diff line change
1
+ include (CMakeParseArguments )
2
+
1
3
# Debugging function
2
4
function (ocv_cmake_dump_vars )
5
+ set (VARS "" )
6
+ get_cmake_property (_variableNames VARIABLES )
3
7
cmake_parse_arguments (DUMP "" "TOFILE" "" ${ARGN} )
4
8
set (regex "${DUMP_UNPARSED_ARGUMENTS} " )
5
- get_cmake_property (_variableNames VARIABLES )
6
- set (VARS "" )
9
+ string (TOLOWER "${regex} " regex_lower )
7
10
foreach (_variableName ${_variableNames} )
8
- if (_variableName MATCHES "${regex} " )
11
+ string (TOLOWER "${_variableName} " _variableName_lower )
12
+ if (_variableName MATCHES "${regex} " OR _variableName_lower MATCHES "${regex_lower} " )
9
13
set (VARS "${VARS}${_variableName} =${${_variableName} }\n " )
10
14
endif ()
11
15
endforeach ()
@@ -16,6 +20,15 @@ function(ocv_cmake_dump_vars)
16
20
endif ()
17
21
endfunction ()
18
22
23
+ function (ocv_cmake_eval var_name )
24
+ if (DEFINED ${var_name} )
25
+ file (WRITE "${CMAKE_BINARY_DIR} /CMakeCommand-${var_name} .cmake" ${${var_name}} )
26
+ include ("${CMAKE_BINARY_DIR} /CMakeCommand-${var_name} .cmake" )
27
+ endif ()
28
+ if (";${ARGN} ;" MATCHES ";ONCE;" )
29
+ unset (${var_name} CACHE )
30
+ endif ()
31
+ endfunction ()
19
32
20
33
# Search packages for host system instead of packages for target system
21
34
# in case of cross compilation thess macro should be defined by toolchain file
You can’t perform that action at this time.
0 commit comments