Skip to content

Commit 14032c6

Browse files
committed
cmake: reset __content variable if file doesn't exist
Resolves CMake error after relaunch with updated source code: Cannot find source file: modules/dnn/layers/layers_common.avx512_skx.cpp
1 parent 17233c6 commit 14032c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/OpenCVCompilerOptimizations.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,8 @@ macro(ocv_add_dispatched_file filename)
760760
set(__file "${CMAKE_CURRENT_BINARY_DIR}/${filename}.${OPT_LOWER}.cpp")
761761
if(EXISTS "${__file}")
762762
file(READ "${__file}" __content)
763+
else()
764+
set(__content "")
763765
endif()
764766
if(__content STREQUAL __codestr)
765767
#message(STATUS "${__file} contains up-to-date content")

0 commit comments

Comments
 (0)