Skip to content

Commit 74f1295

Browse files
committed
Merge pull request opencv#10295 from alalek:cmake_workaround_download_log_issue
2 parents 3966595 + edadcfa commit 74f1295

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cmake/OpenCVDownload.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ function(ocv_download)
156156
TIMEOUT 600
157157
STATUS status
158158
LOG __log)
159-
string(LENGTH "${__log}" __log_length)
160-
if(__log_length LESS 65536)
161-
string(REPLACE "\n" "\n# " __log "${__log}")
162-
ocv_download_log("# ${__log}\n")
159+
if(NOT OPENCV_SKIP_FILE_DOWNLOAD_DUMP) # workaround problem with old CMake versions: "Invalid escape sequence"
160+
string(LENGTH "${__log}" __log_length)
161+
if(__log_length LESS 65536)
162+
string(REPLACE "\n" "\n# " __log "${__log}")
163+
ocv_download_log("# ${__log}\n")
164+
endif()
163165
endif()
164166
if(NOT status EQUAL 0)
165167
set(msg_level FATAL_ERROR)

0 commit comments

Comments
 (0)