File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ endif()
73
73
74
74
include (cmake/OpenCVUtils.cmake )
75
75
76
+ ocv_cmake_eval (DEBUG_PRE ONCE )
77
+
76
78
ocv_clear_vars (OpenCVModules_TARGETS )
77
79
78
80
# ----------------------------------------------------------------------------
@@ -1110,3 +1112,4 @@ include(cmake/OpenCVPackaging.cmake)
1110
1112
1111
1113
# This should be the last command
1112
1114
ocv_cmake_dump_vars ("" TOFILE "CMakeVars.txt" )
1115
+ ocv_cmake_eval (DEBUG_POST ONCE )
Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ function(ocv_cmake_dump_vars)
42
42
endif ()
43
43
endfunction ()
44
44
45
+ function (ocv_cmake_eval var_name )
46
+ if (DEFINED ${var_name} )
47
+ file (WRITE "${CMAKE_BINARY_DIR} /CMakeCommand-${var_name} .cmake" ${${var_name}} )
48
+ include ("${CMAKE_BINARY_DIR} /CMakeCommand-${var_name} .cmake" )
49
+ endif ()
50
+ if (";${ARGN} ;" MATCHES ";ONCE;" )
51
+ unset (${var_name} CACHE )
52
+ endif ()
53
+ endfunction ()
54
+
45
55
# assert macro
46
56
# Note: it doesn't support lists in arguments
47
57
# Usage samples:
You can’t perform that action at this time.
0 commit comments