diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.75.0/emscripten/CMake_catFiles.cmake')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.75.0/emscripten/CMake_catFiles.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/emscripten/CMake_catFiles.cmake b/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/emscripten/CMake_catFiles.cmake new file mode 100644 index 00000000..c637ea24 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/emscripten/CMake_catFiles.cmake @@ -0,0 +1,19 @@ +if(NOT unc_targetfile) + MESSAGE(FATAL_ERROR "unc_targetfile param not defined") +endif() + +function(cat IN_FILE OUT_FILE) + file(READ ${IN_FILE} CONTENTS) + file(APPEND ${OUT_FILE} "${CONTENTS}") +endfunction() + + +SET(unc_tmpfile "${unc_targetfile}_.tmp") + +file(WRITE "${unc_tmpfile}" "") + +cat("${CMAKE_CURRENT_LIST_DIR}/prefix_file" "${unc_tmpfile}") +cat("${unc_targetfile}" "${unc_tmpfile}") +cat("${CMAKE_CURRENT_LIST_DIR}/postfix_file" "${unc_tmpfile}") + +file(RENAME "${unc_tmpfile}" "${unc_targetfile}") |