Skip to content
This repository was archived by the owner on Mar 22, 2020. It is now read-only.

Commit e8a1bc2

Browse files
committed
Suppress error message of execute_process
Command 'execute_process' from OpenCVFindMatlab module can omit error message to the standard output. This can break build of the OpenCV package in ExternalProject_Add (Windows/Visual Studio).
1 parent 09b9b0f commit e8a1bc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/OpenCVFindMatlab.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function(locate_matlab_root)
9494
set(REG_EXTENSION_ "SOFTWARE\\Mathworks\\MATLAB")
9595
set(REG_ROOTS_ "HKEY_LOCAL_MACHINE" "HKEY_CURRENT_USER")
9696
foreach(REG_ROOT_ ${REG_ROOTS_})
97-
execute_process(COMMAND reg query "${REG_ROOT_}\\${REG_EXTENSION_}" OUTPUT_VARIABLE QUERY_RESPONSE_)
97+
execute_process(COMMAND reg query "${REG_ROOT_}\\${REG_EXTENSION_}" OUTPUT_VARIABLE QUERY_RESPONSE_ ERROR_VARIABLE UNUSED_)
9898
if (QUERY_RESPONSE_)
9999
string(REGEX MATCHALL "[0-9]\\.[0-9]" VERSION_STRINGS_ ${QUERY_RESPONSE_})
100100
list(APPEND VERSIONS_ ${VERSION_STRINGS_})

0 commit comments

Comments
 (0)