Skip to content

Commit 2add298

Browse files
committed
Clean up resources after header file generation
1 parent bfe1f0f commit 2add298

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/Utils.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
# build_template("${INCLUDE_PATH}/header_file.h.in" "${INCLUDE_PATH}/header_file.h")
77
macro(build_template TEMPLATE_FILE OUTPUT_FILE)
88
configure_file(${TEMPLATE_FILE} "${OUTPUT_FILE}.temp")
9-
get_filename_component(_cacheKeyPrefix ${OUTPUT_FILE} NAME_WE)
109

1110
if(EXISTS ${OUTPUT_FILE})
1211
file(SHA256 ${OUTPUT_FILE} _last_hash)
1312
file(SHA256 "${OUTPUT_FILE}.temp" _current_hash)
1413
if(NOT _last_hash EQUAL _current_hash)
1514
file(RENAME "${OUTPUT_FILE}.temp" ${OUTPUT_FILE})
1615
endif()
17-
1816
unset(_last_hash)
1917
unset(_current_hash)
2018
else()
2119
file(RENAME "${OUTPUT_FILE}.temp" ${OUTPUT_FILE})
2220
endif()
21+
22+
file(REMOVE "${OUTPUT_FILE}.temp")
2323
endmacro()

0 commit comments

Comments
 (0)