From b25a9d3442ed1eaee15a111cc99e72c2156d61cc Mon Sep 17 00:00:00 2001 From: birolcapa Date: Mon, 19 Oct 2026 11:53:13 +0200 Subject: [PATCH] Update prebuild.cmake to use configure_file Replace file rename with configure_file for copying. COPYONLY leaves the destination (and its timestamp) untouched when unchanged, avoiding unnecessary rebuilds. --- cmake/prebuild.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake index 61ed48c000..580ed0d76f 100644 --- a/cmake/prebuild.cmake +++ b/cmake/prebuild.cmake @@ -1605,7 +1605,8 @@ endif () "#define GEMM_MULTITHREAD_THRESHOLD\t${GEMM_MULTITHREAD_THRESHOLD}\n") # Move to where gen_config_h would place it file(MAKE_DIRECTORY ${TARGET_CONF_DIR}) - file(RENAME ${TARGET_CONF_TEMP} "${TARGET_CONF_DIR}/${TARGET_CONF}") + configure_file("${TARGET_CONF_TEMP}" "${TARGET_CONF_DIR}/${TARGET_CONF}" COPYONLY) + file(REMOVE "${TARGET_CONF_TEMP}") else(NOT CMAKE_CROSSCOMPILING) # compile getarch