From 94b236872ccccf07ce9531a5928d84d79aa287d0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 2 Jan 2018 19:16:51 +0000 Subject: [PATCH] cmake: avoid unnecessary files creation in ocv_cmake_configure() --- cmake/OpenCVUtils.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 8b836c10eb..47e37a3b48 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -32,8 +32,8 @@ function(ocv_cmake_eval var_name) endfunction() macro(ocv_cmake_configure file_name var_name) - configure_file(${file_name} "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${ARGN}) - file(READ "${CMAKE_BINARY_DIR}/CMakeConfig-${var_name}.cmake" ${var_name}) + file(READ "${file_name}" __config) + string(CONFIGURE "${__config}" ${var_name} ${ARGN}) endmacro() macro(ocv_update VAR)