We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfe1f0f commit 2add298Copy full SHA for 2add298
cmake/Utils.cmake
@@ -6,18 +6,18 @@
6
# build_template("${INCLUDE_PATH}/header_file.h.in" "${INCLUDE_PATH}/header_file.h")
7
macro(build_template TEMPLATE_FILE OUTPUT_FILE)
8
configure_file(${TEMPLATE_FILE} "${OUTPUT_FILE}.temp")
9
- get_filename_component(_cacheKeyPrefix ${OUTPUT_FILE} NAME_WE)
10
11
if(EXISTS ${OUTPUT_FILE})
12
file(SHA256 ${OUTPUT_FILE} _last_hash)
13
file(SHA256 "${OUTPUT_FILE}.temp" _current_hash)
14
if(NOT _last_hash EQUAL _current_hash)
15
file(RENAME "${OUTPUT_FILE}.temp" ${OUTPUT_FILE})
16
endif()
17
-
18
unset(_last_hash)
19
unset(_current_hash)
20
else()
21
22
+
+ file(REMOVE "${OUTPUT_FILE}.temp")
23
endmacro()
0 commit comments