Skip to content

Commit 94b2368

Browse files
committed
cmake: avoid unnecessary files creation in ocv_cmake_configure()
1 parent 7abaae3 commit 94b2368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/OpenCVUtils.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function(ocv_cmake_eval var_name)
3232
endfunction()
3333

3434
macro(ocv_cmake_configure file_name var_name)
35-
configure_file(${file_name} "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${ARGN})
36-
file(READ "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${var_name})
35+
file(READ "${file_name}" __config)
36+
string(CONFIGURE "${__config}" ${var_name} ${ARGN})
3737
endmacro()
3838

3939
macro(ocv_update VAR)

0 commit comments

Comments
 (0)