File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,20 @@ include(CMakeParseArguments)
8
8
function (ocv_cmake_dump_vars )
9
9
set (OPENCV_SUPPRESS_DEPRECATIONS 1 ) # suppress deprecation warnings from variable_watch() guards
10
10
get_cmake_property (__variableNames VARIABLES )
11
- cmake_parse_arguments (DUMP "" "TOFILE" "" ${ARGN} )
11
+ cmake_parse_arguments (DUMP "FORCE" "TOFILE" "" ${ARGN} )
12
+
13
+ # avoid generation of excessive logs with "--trace" or "--trace-expand" parameters
14
+ # Note: `-DCMAKE_TRACE_MODE=1` should be passed to CMake through command line. It is not a CMake buildin variable for now (2020-12)
15
+ # Use `cmake . -UCMAKE_TRACE_MODE` to remove this variable from cache
16
+ if (CMAKE_TRACE_MODE AND NOT DUMP_FORCE )
17
+ if (DUMP_TOFILE )
18
+ file (WRITE ${CMAKE_BINARY_DIR} /${DUMP_TOFILE} "Skipped due to enabled CMAKE_TRACE_MODE" )
19
+ else ()
20
+ message (AUTHOR_WARNING "ocv_cmake_dump_vars() is skipped due to enabled CMAKE_TRACE_MODE" )
21
+ endif ()
22
+ return ()
23
+ endif ()
24
+
12
25
set (regex "${DUMP_UNPARSED_ARGUMENTS} " )
13
26
string (TOLOWER "${regex} " regex_lower )
14
27
set (__VARS "" )
You can’t perform that action at this time.
0 commit comments